diff --git a/src/Base/QuantityLexer.c b/src/Base/QuantityLexer.c index 47c2f8ac42..acc0640b40 100644 --- a/src/Base/QuantityLexer.c +++ b/src/Base/QuantityLexer.c @@ -353,8 +353,8 @@ static void yynoreturn yy_fatal_error ( const char* msg ); (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 103 -#define YY_END_OF_BUFFER 104 +#define YY_NUM_RULES 105 +#define YY_END_OF_BUFFER 106 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -362,28 +362,30 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[191] = +static const flex_int16_t yy_accept[194] = { 0, - 0, 0, 0, 0, 104, 102, 4, 5, 38, 40, - 6, 102, 7, 102, 80, 79, 27, 102, 102, 68, - 31, 77, 51, 102, 78, 102, 67, 65, 1, 102, - 102, 102, 85, 102, 21, 26, 102, 102, 17, 15, - 102, 102, 102, 102, 24, 23, 102, 102, 102, 102, - 3, 103, 2, 5, 83, 81, 82, 80, 80, 0, + 0, 0, 0, 0, 106, 104, 4, 5, 38, 40, + 6, 104, 7, 104, 82, 81, 27, 104, 104, 68, + 31, 77, 51, 104, 79, 104, 67, 65, 1, 104, + 104, 104, 87, 104, 21, 26, 104, 104, 17, 15, + 104, 104, 104, 104, 24, 23, 104, 104, 104, 104, + 3, 105, 2, 5, 85, 83, 84, 82, 82, 0, 71, 0, 30, 53, 0, 69, 55, 0, 66, 72, 0, 0, 0, 0, 36, 13, 0, 0, 0, 14, 0, 39, 0, 37, 29, 52, 0, 22, 16, 0, 45, 0, 28, 32, 54, 0, 20, 44, 12, 0, - 9, 47, 84, 0, 0, 0, 0, 0, 48, 0, + 9, 47, 86, 0, 0, 0, 0, 0, 48, 0, 0, 34, 0, 18, 10, 43, 73, 0, 0, 0, - 0, 82, 0, 80, 0, 0, 80, 58, 57, 0, - 70, 92, 0, 0, 0, 90, 49, 74, 91, 76, - 56, 64, 50, 46, 94, 0, 42, 25, 93, 35, - 96, 63, 75, 97, 0, 99, 0, 0, 33, 0, - 19, 11, 8, 0, 83, 0, 81, 0, 82, 0, - 80, 59, 86, 87, 88, 0, 0, 98, 101, 100, - 41, 0, 0, 89, 95, 60, 61, 0, 62, 0 + 0, 0, 84, 0, 82, 0, 0, 82, 58, 57, + 0, 70, 94, 0, 0, 0, 92, 49, 74, 93, + 76, 56, 64, 50, 46, 96, 0, 42, 25, 95, + 35, 98, 63, 75, 99, 0, 101, 0, 0, 33, + 0, 19, 11, 78, 80, 8, 0, 85, 0, 83, + 0, 84, 0, 82, 59, 88, 89, 90, 0, 0, + 100, 103, 102, 41, 0, 0, 91, 97, 60, 61, + 0, 62, 0 + } ; static const YY_CHAR yy_ec[256] = @@ -401,173 +403,176 @@ static const YY_CHAR yy_ec[256] = 34, 35, 36, 37, 38, 1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 1, 50, 51, - 52, 53, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 54, 1, 1, 1, 1, + 52, 53, 1, 1, 1, 1, 1, 54, 1, 1, 1, 1, 1, 1, 1, 55, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 56, 1, 1, 1, 1, - 57, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 58, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 57, 1, 58, 59, 1, + 60, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 61, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 59, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 62, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[60] = +static const YY_CHAR yy_meta[63] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1 } ; -static const flex_int16_t yy_base[192] = +static const flex_int16_t yy_base[195] = { 0, - 0, 0, 57, 58, 318, 319, 319, 314, 319, 319, - 319, 51, 319, 55, 62, 80, 319, 290, 292, 319, - 319, 62, 273, 283, 319, 269, 296, 263, 319, 51, - 62, 37, 258, 260, 264, 319, 264, 85, 58, 95, - 264, 251, 66, 273, 80, 86, 86, 269, 24, 247, - 319, 319, 319, 297, 128, 135, 142, 153, 167, 179, - 319, 269, 319, 319, 268, 319, 319, 251, 249, 319, - 248, 251, 255, 262, 319, 319, 244, 242, 253, 319, - 244, 319, 245, 319, 319, 319, 256, 319, 319, 247, - 89, 248, 319, 319, 319, 240, 319, 95, 319, 110, + 0, 0, 60, 61, 324, 325, 325, 320, 325, 325, + 325, 54, 325, 58, 65, 83, 325, 296, 298, 325, + 325, 65, 279, 289, 325, 275, 302, 269, 325, 54, + 65, 40, 264, 266, 270, 325, 270, 88, 61, 98, + 270, 257, 69, 279, 83, 89, 89, 275, 80, 29, + 325, 325, 325, 304, 131, 138, 145, 156, 170, 182, + 325, 276, 325, 325, 275, 325, 325, 258, 256, 325, + 255, 258, 262, 269, 325, 325, 251, 249, 260, 325, + 251, 325, 252, 325, 325, 325, 263, 325, 325, 254, + 92, 255, 325, 325, 325, 247, 325, 121, 325, 113, - 319, 319, 319, 232, 243, 247, 237, 203, 319, 206, - 192, 319, 188, 319, 319, 319, 319, 169, 167, 195, - 204, 186, 212, 216, 225, 160, 229, 319, 319, 168, - 319, 319, 165, 154, 153, 319, 319, 319, 319, 319, - 319, 319, 319, 319, 173, 137, 319, 319, 319, 319, - 319, 319, 319, 145, 120, 126, 112, 114, 319, 115, - 319, 319, 319, 233, 240, 244, 248, 252, 256, 260, - 264, 319, 319, 319, 144, 140, 98, 319, 319, 319, - 319, 88, 83, 319, 319, 319, 319, 73, 319, 319, - 101 + 325, 325, 325, 239, 250, 254, 244, 206, 325, 209, + 195, 325, 191, 325, 325, 325, 325, 172, 116, 169, + 198, 207, 189, 215, 219, 228, 232, 236, 325, 325, + 171, 325, 325, 168, 157, 156, 325, 325, 325, 325, + 325, 325, 325, 325, 325, 176, 140, 325, 325, 325, + 325, 325, 325, 325, 148, 129, 139, 122, 120, 325, + 121, 325, 325, 325, 325, 325, 243, 247, 251, 255, + 259, 263, 267, 271, 325, 325, 325, 147, 143, 101, + 325, 325, 325, 325, 92, 86, 325, 325, 325, 325, + 76, 325, 325, 104 } ; -static const flex_int16_t yy_def[192] = +static const flex_int16_t yy_def[195] = { 0, - 190, 1, 191, 191, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 193, 1, 194, 194, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 0, - 190 + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 0, 193 } ; -static const flex_int16_t yy_nxt[379] = +static const flex_int16_t yy_nxt[388] = { 0, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 16, 15, 15, 17, 18, 6, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 6, 30, 6, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 6, 44, 45, 46, 47, 6, - 6, 48, 6, 6, 6, 6, 6, 49, 50, 52, - 52, 55, 55, 55, 55, 56, 56, 56, 56, 57, - 79, 58, 59, 59, 59, 59, 63, 80, 60, 117, - 118, 71, 72, 64, 65, 53, 53, 57, 91, 58, - 59, 59, 59, 59, 75, 60, 60, 73, 74, 85, + 6, 48, 6, 6, 6, 6, 6, 6, 6, 6, + 49, 50, 52, 52, 55, 55, 55, 55, 56, 56, + 56, 56, 57, 79, 58, 59, 59, 59, 59, 63, + 80, 60, 119, 120, 71, 72, 64, 65, 53, 53, + 57, 91, 58, 59, 59, 59, 59, 75, 60, 60, - 92, 51, 76, 103, 77, 112, 86, 87, 104, 93, - 113, 78, 105, 60, 94, 110, 95, 107, 189, 96, - 88, 114, 111, 143, 108, 89, 115, 109, 188, 144, - 97, 90, 98, 187, 147, 99, 148, 100, 55, 55, - 55, 55, 149, 186, 120, 56, 56, 56, 56, 150, - 185, 121, 122, 122, 122, 122, 184, 183, 123, 182, - 181, 120, 180, 124, 124, 124, 124, 179, 121, 125, - 127, 127, 127, 127, 57, 123, 58, 59, 59, 59, - 59, 178, 177, 60, 176, 126, 125, 126, 159, 127, - 127, 127, 127, 160, 175, 174, 122, 122, 122, 122, + 73, 74, 85, 92, 51, 76, 103, 77, 112, 86, + 87, 104, 93, 113, 78, 105, 60, 94, 110, 95, + 107, 192, 96, 88, 114, 111, 144, 108, 89, 115, + 109, 191, 145, 97, 90, 98, 117, 190, 99, 118, + 100, 55, 55, 55, 55, 150, 189, 121, 56, 56, + 56, 56, 151, 188, 122, 123, 123, 123, 123, 187, + 148, 124, 149, 186, 121, 185, 125, 125, 125, 125, + 184, 122, 126, 164, 165, 183, 182, 57, 124, 58, + 59, 59, 59, 59, 181, 180, 60, 179, 127, 126, + 127, 160, 128, 128, 128, 128, 161, 178, 177, 123, - 60, 164, 123, 164, 161, 165, 165, 165, 165, 162, - 166, 173, 166, 172, 167, 167, 167, 167, 168, 123, - 168, 163, 169, 169, 169, 169, 124, 124, 124, 124, - 158, 170, 125, 170, 157, 171, 171, 171, 171, 127, - 127, 127, 127, 165, 165, 165, 165, 156, 155, 125, - 165, 165, 165, 165, 167, 167, 167, 167, 167, 167, - 167, 167, 169, 169, 169, 169, 169, 169, 169, 169, - 171, 171, 171, 171, 171, 171, 171, 171, 154, 153, - 152, 151, 146, 145, 142, 141, 140, 139, 138, 137, - 136, 135, 134, 133, 132, 131, 130, 129, 128, 54, + 123, 123, 123, 60, 167, 124, 167, 162, 168, 168, + 168, 168, 163, 169, 176, 169, 175, 170, 170, 170, + 170, 171, 124, 171, 166, 172, 172, 172, 172, 125, + 125, 125, 125, 159, 173, 126, 173, 158, 174, 174, + 174, 174, 128, 128, 128, 128, 128, 128, 128, 128, + 157, 156, 126, 168, 168, 168, 168, 168, 168, 168, + 168, 170, 170, 170, 170, 170, 170, 170, 170, 172, + 172, 172, 172, 172, 172, 172, 172, 174, 174, 174, + 174, 174, 174, 174, 174, 155, 154, 153, 152, 147, + 146, 143, 142, 141, 140, 139, 138, 137, 136, 135, - 119, 116, 106, 102, 101, 84, 83, 82, 81, 70, - 69, 68, 67, 66, 62, 61, 54, 190, 5, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190 + 134, 133, 132, 131, 130, 129, 54, 116, 106, 102, + 101, 84, 83, 82, 81, 70, 69, 68, 67, 66, + 62, 61, 54, 193, 5, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193 } ; -static const flex_int16_t yy_chk[379] = +static const flex_int16_t yy_chk[388] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 4, 12, 12, 12, 12, 14, 14, 14, 14, 15, - 32, 15, 15, 15, 15, 15, 22, 32, 15, 49, - 49, 30, 30, 22, 22, 3, 4, 16, 39, 16, - 16, 16, 16, 16, 31, 15, 16, 30, 30, 38, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 4, 12, 12, 12, 12, 14, 14, + 14, 14, 15, 32, 15, 15, 15, 15, 15, 22, + 32, 15, 50, 50, 30, 30, 22, 22, 3, 4, + 16, 39, 16, 16, 16, 16, 16, 31, 15, 16, - 39, 191, 31, 43, 31, 47, 38, 38, 43, 40, - 47, 31, 43, 16, 40, 46, 40, 45, 188, 40, - 38, 47, 46, 91, 45, 38, 47, 45, 183, 91, - 40, 38, 40, 182, 98, 40, 98, 40, 55, 55, - 55, 55, 100, 177, 55, 56, 56, 56, 56, 100, - 176, 56, 57, 57, 57, 57, 175, 160, 57, 158, - 157, 55, 156, 58, 58, 58, 58, 155, 56, 58, - 126, 126, 126, 126, 59, 57, 59, 59, 59, 59, - 59, 154, 146, 59, 145, 60, 58, 60, 118, 60, - 60, 60, 60, 118, 135, 134, 122, 122, 122, 122, + 30, 30, 38, 39, 194, 31, 43, 31, 47, 38, + 38, 43, 40, 47, 31, 43, 16, 40, 46, 40, + 45, 191, 40, 38, 47, 46, 91, 45, 38, 47, + 45, 186, 91, 40, 38, 40, 49, 185, 40, 49, + 40, 55, 55, 55, 55, 100, 180, 55, 56, 56, + 56, 56, 100, 179, 56, 57, 57, 57, 57, 178, + 98, 57, 98, 161, 55, 159, 58, 58, 58, 58, + 158, 56, 58, 119, 119, 157, 156, 59, 57, 59, + 59, 59, 59, 59, 155, 147, 59, 146, 60, 58, + 60, 118, 60, 60, 60, 60, 118, 136, 135, 123, - 59, 120, 122, 120, 118, 120, 120, 120, 120, 118, - 121, 133, 121, 130, 121, 121, 121, 121, 123, 122, - 123, 119, 123, 123, 123, 123, 124, 124, 124, 124, - 113, 125, 124, 125, 111, 125, 125, 125, 125, 127, - 127, 127, 127, 164, 164, 164, 164, 110, 108, 124, - 165, 165, 165, 165, 166, 166, 166, 166, 167, 167, - 167, 167, 168, 168, 168, 168, 169, 169, 169, 169, - 170, 170, 170, 170, 171, 171, 171, 171, 107, 106, - 105, 104, 96, 92, 90, 87, 83, 81, 79, 78, - 77, 74, 73, 72, 71, 69, 68, 65, 62, 54, + 123, 123, 123, 59, 121, 123, 121, 118, 121, 121, + 121, 121, 118, 122, 134, 122, 131, 122, 122, 122, + 122, 124, 123, 124, 120, 124, 124, 124, 124, 125, + 125, 125, 125, 113, 126, 125, 126, 111, 126, 126, + 126, 126, 127, 127, 127, 127, 128, 128, 128, 128, + 110, 108, 125, 167, 167, 167, 167, 168, 168, 168, + 168, 169, 169, 169, 169, 170, 170, 170, 170, 171, + 171, 171, 171, 172, 172, 172, 172, 173, 173, 173, + 173, 174, 174, 174, 174, 107, 106, 105, 104, 96, + 92, 90, 87, 83, 81, 79, 78, 77, 74, 73, - 50, 48, 44, 42, 41, 37, 35, 34, 33, 28, - 27, 26, 24, 23, 19, 18, 8, 5, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190 + 72, 71, 69, 68, 65, 62, 54, 48, 44, 42, + 41, 37, 35, 34, 33, 28, 27, 26, 24, 23, + 19, 18, 8, 5, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193 } ; static yy_state_type yy_last_accepting_state; @@ -595,12 +600,12 @@ char *yytext; * on Win32. The C++ scanner uses STL streams instead. */ #define YY_NO_UNISTD_H -#line 599 "QuantityLexer.c" +#line 604 "QuantityLexer.c" /*** Flex Declarations and Options ***/ /* the manual says "somewhat more optimized" */ /* no support for include files is planned */ -#line 604 "QuantityLexer.c" +#line 609 "QuantityLexer.c" #define INITIAL 0 #define C_COMMENT 1 @@ -819,7 +824,7 @@ YY_DECL #line 32 "" -#line 823 "QuantityLexer.c" +#line 828 "QuantityLexer.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -846,13 +851,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 191 ) + if ( yy_current_state >= 194 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 190 ); + while ( yy_current_state != 193 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1261,134 +1266,144 @@ yylval = Quantity::AngMinute; return UNIT; // minute(Angular) case 78: YY_RULE_SETUP #line 136 "" -yylval = Quantity::AngSecond; return UNIT; // second(Angular) +yylval = Quantity::AngMinute; return UNIT; // minute(Angular) YY_BREAK case 79: YY_RULE_SETUP -#line 138 "" -yylval = Quantity(1.0); return ONE; +#line 137 "" +yylval = Quantity::AngSecond; return UNIT; // second(Angular) YY_BREAK case 80: YY_RULE_SETUP -#line 139 "" -{ yylval = Quantity(num_change(yytext,'.',','));return NUM; } +#line 138 "" +yylval = Quantity::AngSecond; return UNIT; // second(Angular) YY_BREAK case 81: YY_RULE_SETUP #line 140 "" -{ yylval = Quantity(num_change(yytext,'.',','));return NUM; } +yylval = Quantity(1.0); return ONE; YY_BREAK case 82: YY_RULE_SETUP #line 141 "" -{ yylval = Quantity(num_change(yytext,',','.'));return NUM; } +{ yylval = Quantity(num_change(yytext,'.',','));return NUM; } YY_BREAK case 83: YY_RULE_SETUP #line 142 "" -{ yylval = Quantity(num_change(yytext,',','.'));return NUM; } +{ yylval = Quantity(num_change(yytext,'.',','));return NUM; } YY_BREAK case 84: YY_RULE_SETUP -#line 145 "" -{yylval = Quantity(M_PI) ; return NUM;} // constant pi +#line 143 "" +{ yylval = Quantity(num_change(yytext,',','.'));return NUM; } YY_BREAK case 85: YY_RULE_SETUP -#line 146 "" -{yylval = Quantity(M_E) ; return NUM;} // constant e +#line 144 "" +{ yylval = Quantity(num_change(yytext,',','.'));return NUM; } YY_BREAK case 86: YY_RULE_SETUP -#line 148 "" -return ACOS; +#line 147 "" +{yylval = Quantity(M_PI) ; return NUM;} // constant pi YY_BREAK case 87: YY_RULE_SETUP -#line 149 "" -return ASIN; +#line 148 "" +{yylval = Quantity(M_E) ; return NUM;} // constant e YY_BREAK case 88: YY_RULE_SETUP #line 150 "" -return ATAN; +return ACOS; YY_BREAK case 89: YY_RULE_SETUP #line 151 "" -return ATAN2; +return ASIN; YY_BREAK case 90: YY_RULE_SETUP #line 152 "" -return COS; +return ATAN; YY_BREAK case 91: YY_RULE_SETUP #line 153 "" -return EXP; +return ATAN2; YY_BREAK case 92: YY_RULE_SETUP #line 154 "" -return ABS; +return COS; YY_BREAK case 93: YY_RULE_SETUP #line 155 "" -return MOD; +return EXP; YY_BREAK case 94: YY_RULE_SETUP #line 156 "" -return LOG; +return ABS; YY_BREAK case 95: YY_RULE_SETUP #line 157 "" -return LOG10; +return MOD; YY_BREAK case 96: YY_RULE_SETUP #line 158 "" -return POW; +return LOG; YY_BREAK case 97: YY_RULE_SETUP #line 159 "" -return SIN; +return LOG10; YY_BREAK case 98: YY_RULE_SETUP #line 160 "" -return SINH; +return POW; YY_BREAK case 99: YY_RULE_SETUP #line 161 "" -return TAN; +return SIN; YY_BREAK case 100: YY_RULE_SETUP #line 162 "" -return TANH; +return SINH; YY_BREAK case 101: YY_RULE_SETUP #line 163 "" -return SQRT; +return TAN; YY_BREAK case 102: YY_RULE_SETUP -#line 165 "" -return *yytext; +#line 164 "" +return TANH; YY_BREAK case 103: YY_RULE_SETUP -#line 166 "" +#line 165 "" +return SQRT; + YY_BREAK +case 104: +YY_RULE_SETUP +#line 167 "" +return *yytext; + YY_BREAK +case 105: +YY_RULE_SETUP +#line 168 "" ECHO; YY_BREAK -#line 1392 "QuantityLexer.c" +#line 1407 "QuantityLexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(C_COMMENT): yyterminate(); @@ -1687,7 +1702,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 191 ) + if ( yy_current_state >= 194 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1715,11 +1730,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 191 ) + if ( yy_current_state >= 194 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 190); + yy_is_jam = (yy_current_state == 193); return yy_is_jam ? 0 : yy_current_state; } @@ -2358,4 +2373,4 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 166 "" +#line 168 "" diff --git a/src/Base/QuantityParser.l b/src/Base/QuantityParser.l index 18bdb14408..e16eee1b3c 100644 --- a/src/Base/QuantityParser.l +++ b/src/Base/QuantityParser.l @@ -133,7 +133,9 @@ CGRP '\,'[0-9][0-9][0-9] "rad" yylval = Quantity::Radian; return UNIT; // radian "gon" yylval = Quantity::Gon; return UNIT; // gon "M" yylval = Quantity::AngMinute; return UNIT; // minute(Angular) +"\xE2\x80\xB2" yylval = Quantity::AngMinute; return UNIT; // minute(Angular) "S" yylval = Quantity::AngSecond; return UNIT; // second(Angular) +"\xE2\x80\xB3" yylval = Quantity::AngSecond; return UNIT; // second(Angular) "1" yylval = Quantity(1.0); return ONE; {DIGIT}+"."?{DIGIT}*{EXPO}? { yylval = Quantity(num_change(yytext,'.',','));return NUM; } diff --git a/src/Base/UnitsSchemaImperial1.cpp b/src/Base/UnitsSchemaImperial1.cpp index c0f41e29a9..6f0d521e96 100644 --- a/src/Base/UnitsSchemaImperial1.cpp +++ b/src/Base/UnitsSchemaImperial1.cpp @@ -363,11 +363,9 @@ QString UnitsSchemaImperialCivil::schemaTranslate(const Base::Quantity& quant, d // this schema expresses angles in degrees + minutes + seconds else if (unit == Unit::Angle) { unitString = QString::fromUtf8("deg"); -// unitString = QString::fromUtf8("\xC2\xB0"); //U+00B0 degree symbol -// QString degreeString = QString::fromUtf8("\xC2\xB0"); - QString degreeString = QString::fromUtf8("deg"); - QString minuteString = QString::fromUtf8("M"); - QString secondString = QString::fromUtf8("S"); + QString degreeString = QString::fromUtf8(u8"\xC2\xB0"); //degree symbol + QString minuteString = QString::fromUtf8(u8"\xE2\x80\xB2"); //prime symbol + QString secondString = QString::fromUtf8(u8"\xE2\x80\xB3"); //double prime symbol factor = 1.0; //1deg = 1"\xC2\xB0 " double totalDegrees = quant.getValue()/factor; @@ -387,10 +385,10 @@ QString UnitsSchemaImperialCivil::schemaTranslate(const Base::Quantity& quant, d std::stringstream output; output << outDeg << degreeString.toUtf8().constData(); if ((outMin > 0) || (outSec > 0)) { - output << outMin << minuteString.toStdString(); + output << outMin << minuteString.toUtf8().constData(); } if (outSec > 0) { - output << outSec << secondString.toStdString(); + output << outSec << secondString.toUtf8().constData(); } // uncomment this for decimals on seconds // if (remainSeconds < (1.0 * pow(10.0,-Base::UnitsApi::getDecimals())) ) {