Add support for day based values.

fixes #4761
This commit is contained in:
Michael Friedrich 2013-09-26 19:03:27 +02:00
parent f1bc61c188
commit f832e814ff
2 changed files with 146 additions and 139 deletions

View File

@ -1,5 +1,5 @@
#line 3 "../../../lib/config/config_lexer.cc" #line 3 "config_lexer.cc"
#define YY_INT_ALIGNED short int #define YY_INT_ALIGNED short int
@ -370,8 +370,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp; yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 58 #define YY_NUM_RULES 59
#define YY_END_OF_BUFFER 59 #define YY_END_OF_BUFFER 60
/* This struct is not used in this scanner, /* This struct is not used in this scanner,
but its presence is necessary. */ but its presence is necessary. */
struct yy_trans_info struct yy_trans_info
@ -379,28 +379,28 @@ struct yy_trans_info
flex_int32_t yy_verify; flex_int32_t yy_verify;
flex_int32_t yy_nxt; flex_int32_t yy_nxt;
}; };
static yyconst flex_int16_t yy_accept[188] = static yyconst flex_int16_t yy_accept[189] =
{ 0, { 0,
0, 0, 0, 0, 0, 0, 0, 0, 59, 57, 0, 0, 0, 0, 0, 0, 0, 0, 60, 58,
21, 21, 1, 57, 57, 57, 57, 57, 51, 57, 21, 21, 1, 58, 58, 58, 58, 58, 52, 58,
52, 57, 45, 45, 45, 45, 45, 45, 45, 45, 53, 58, 45, 45, 45, 45, 45, 45, 45, 45,
45, 45, 45, 57, 18, 19, 12, 3, 2, 58, 45, 45, 45, 58, 18, 19, 12, 3, 2, 59,
15, 15, 0, 0, 0, 55, 53, 51, 54, 16, 15, 15, 0, 0, 0, 56, 54, 52, 55, 16,
20, 56, 0, 48, 49, 50, 0, 43, 46, 44, 20, 57, 0, 48, 49, 50, 51, 0, 43, 46,
45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45,
45, 45, 45, 45, 45, 45, 45, 0, 17, 12, 45, 45, 45, 45, 45, 45, 45, 45, 0, 17,
11, 4, 5, 9, 10, 6, 8, 7, 0, 0, 12, 11, 4, 5, 9, 10, 6, 8, 7, 0,
0, 0, 20, 51, 47, 28, 45, 45, 45, 45, 0, 0, 0, 20, 52, 47, 28, 45, 45, 45,
45, 45, 45, 45, 45, 45, 45, 45, 42, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 42,
45, 45, 45, 13, 4, 5, 14, 0, 0, 0, 45, 45, 45, 45, 13, 4, 5, 14, 0, 0,
45, 45, 45, 45, 45, 45, 29, 38, 45, 45, 0, 45, 45, 45, 45, 45, 45, 29, 38, 45,
45, 45, 45, 45, 40, 22, 4, 0, 0, 0, 45, 45, 45, 45, 45, 40, 22, 4, 0, 0,
24, 45, 41, 45, 45, 45, 45, 45, 45, 45, 0, 24, 45, 41, 45, 45, 45, 45, 45, 45,
45, 45, 0, 0, 0, 45, 45, 45, 45, 25, 45, 45, 45, 0, 0, 0, 45, 45, 45, 45,
33, 45, 27, 26, 45, 0, 0, 0, 45, 35, 25, 33, 45, 27, 26, 45, 0, 0, 0, 45,
45, 36, 39, 45, 0, 31, 0, 45, 37, 34, 35, 45, 36, 39, 45, 0, 31, 0, 45, 37,
0, 0, 45, 32, 30, 23, 0 34, 0, 0, 45, 32, 30, 23, 0
} ; } ;
static yyconst flex_int32_t yy_ec[256] = static yyconst flex_int32_t yy_ec[256] =
@ -444,134 +444,135 @@ static yyconst flex_int32_t yy_meta[43] =
1, 1 1, 1
} ; } ;
static yyconst flex_int16_t yy_base[196] = static yyconst flex_int16_t yy_base[197] =
{ 0, { 0,
0, 0, 236, 235, 40, 42, 198, 197, 238, 243, 0, 0, 232, 231, 40, 42, 194, 193, 234, 239,
243, 243, 243, 28, 222, 221, 37, 44, 44, 48, 239, 239, 239, 28, 218, 217, 37, 44, 59, 37,
243, 219, 0, 26, 207, 214, 201, 204, 46, 210, 239, 215, 0, 26, 203, 210, 197, 200, 36, 206,
210, 45, 46, 187, 243, 217, 0, 243, 243, 76, 206, 41, 42, 183, 239, 213, 0, 239, 239, 85,
243, 184, 188, 201, 204, 243, 243, 67, 243, 243, 239, 180, 184, 197, 200, 239, 239, 0, 239, 239,
0, 243, 60, 243, 186, 243, 205, 204, 243, 243, 0, 239, 61, 239, 239, 182, 239, 201, 200, 239,
0, 179, 183, 196, 187, 64, 195, 184, 62, 185, 239, 0, 175, 179, 192, 183, 54, 191, 180, 54,
177, 192, 173, 174, 178, 169, 173, 164, 243, 0, 181, 173, 188, 169, 170, 174, 165, 169, 160, 239,
243, 83, 87, 243, 243, 243, 243, 243, 162, 166, 0, 239, 75, 79, 239, 239, 239, 239, 239, 158,
168, 172, 0, 90, 243, 0, 181, 162, 162, 168, 162, 164, 168, 0, 81, 239, 0, 177, 158, 158,
173, 160, 171, 164, 172, 168, 153, 160, 0, 161, 164, 169, 156, 167, 160, 168, 164, 149, 156, 0,
154, 163, 162, 243, 93, 97, 243, 149, 145, 155, 157, 150, 159, 158, 239, 87, 89, 239, 145, 141,
141, 153, 156, 140, 142, 157, 0, 0, 152, 153, 151, 137, 149, 152, 136, 138, 153, 0, 0, 148,
146, 153, 140, 141, 0, 0, 103, 142, 141, 145, 149, 142, 149, 136, 137, 0, 0, 101, 138, 137,
0, 134, 0, 143, 137, 128, 127, 124, 141, 124, 141, 0, 130, 0, 139, 133, 124, 123, 120, 137,
133, 138, 136, 120, 133, 114, 121, 88, 84, 0, 120, 129, 134, 132, 116, 129, 110, 117, 84, 79,
0, 94, 0, 0, 85, 83, 96, 81, 98, 0, 0, 0, 89, 0, 0, 78, 76, 87, 71, 87,
76, 0, 0, 87, 69, 243, 57, 48, 0, 0, 0, 68, 0, 0, 79, 57, 239, 56, 44, 0,
54, 40, 33, 243, 243, 0, 243, 126, 130, 134, 0, 53, 34, 26, 239, 239, 0, 239, 122, 126,
138, 47, 142, 146, 150 130, 134, 52, 138, 142, 146
} ; } ;
static yyconst flex_int16_t yy_def[196] = static yyconst flex_int16_t yy_def[197] =
{ 0, { 0,
187, 1, 188, 188, 189, 189, 190, 190, 187, 187, 188, 1, 189, 189, 190, 190, 191, 191, 188, 188,
187, 187, 187, 187, 187, 187, 187, 187, 187, 191, 188, 188, 188, 188, 188, 188, 188, 188, 188, 192,
187, 187, 192, 192, 192, 192, 192, 192, 192, 192, 188, 188, 193, 193, 193, 193, 193, 193, 193, 193,
192, 192, 192, 187, 187, 187, 193, 187, 187, 194, 193, 193, 193, 188, 188, 188, 194, 188, 188, 195,
187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 19, 188, 188,
195, 187, 187, 187, 187, 187, 191, 191, 187, 187, 196, 188, 188, 188, 188, 188, 188, 192, 192, 188,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 188, 193, 193, 193, 193, 193, 193, 193, 193, 193,
192, 192, 192, 192, 192, 192, 192, 187, 187, 193, 193, 193, 193, 193, 193, 193, 193, 193, 188, 188,
187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 194, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 195, 187, 187, 192, 192, 192, 192, 192, 188, 188, 188, 196, 188, 188, 193, 193, 193, 193,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
192, 192, 192, 187, 187, 187, 187, 187, 187, 187, 193, 193, 193, 193, 188, 188, 188, 188, 188, 188,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 188, 193, 193, 193, 193, 193, 193, 193, 193, 193,
192, 192, 192, 192, 192, 192, 187, 187, 187, 187, 193, 193, 193, 193, 193, 193, 193, 188, 188, 188,
192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 188, 193, 193, 193, 193, 193, 193, 193, 193, 193,
192, 192, 187, 187, 187, 192, 192, 192, 192, 192, 193, 193, 193, 188, 188, 188, 193, 193, 193, 193,
192, 192, 192, 192, 192, 187, 187, 187, 192, 192, 193, 193, 193, 193, 193, 193, 188, 188, 188, 193,
192, 192, 192, 192, 187, 187, 187, 192, 192, 192, 193, 193, 193, 193, 193, 188, 188, 188, 193, 193,
187, 187, 192, 187, 187, 192, 0, 187, 187, 187, 193, 188, 188, 193, 188, 188, 193, 0, 188, 188,
187, 187, 187, 187, 187 188, 188, 188, 188, 188, 188
} ; } ;
static yyconst flex_int16_t yy_nxt[286] = static yyconst flex_int16_t yy_nxt[282] =
{ 0, { 0,
10, 11, 12, 13, 14, 15, 16, 17, 10, 18, 10, 11, 12, 13, 14, 15, 16, 17, 10, 18,
19, 19, 10, 20, 21, 22, 23, 10, 24, 23, 19, 19, 10, 20, 21, 22, 23, 10, 24, 23,
23, 25, 23, 26, 23, 23, 27, 23, 28, 23, 23, 25, 23, 26, 23, 23, 27, 23, 28, 23,
29, 30, 31, 23, 23, 32, 33, 23, 23, 23, 29, 30, 31, 23, 23, 32, 33, 23, 23, 23,
34, 10, 38, 39, 38, 39, 43, 48, 48, 50, 34, 10, 38, 39, 38, 39, 43, 48, 48, 50,
61, 49, 53, 51, 48, 48, 62, 40, 52, 40, 59, 49, 60, 51, 69, 62, 63, 40, 52, 40,
63, 58, 44, 59, 68, 72, 45, 73, 75, 54, 64, 73, 44, 74, 76, 187, 45, 53, 186, 48,
94, 94, 186, 55, 185, 53, 184, 48, 48, 56, 48, 95, 95, 70, 101, 185, 77, 75, 184, 102,
76, 74, 183, 69, 100, 77, 82, 83, 182, 101, 54, 78, 105, 106, 55, 116, 117, 183, 56, 117,
104, 105, 54, 115, 116, 84, 55, 116, 116, 85, 117, 95, 95, 182, 57, 83, 84, 138, 117, 117,
94, 94, 56, 137, 116, 181, 86, 116, 116, 180, 117, 181, 54, 180, 85, 179, 55, 178, 86, 177,
87, 179, 88, 116, 116, 54, 178, 177, 176, 55, 56, 117, 117, 176, 175, 87, 57, 174, 173, 88,
175, 174, 173, 172, 171, 56, 35, 35, 35, 35, 172, 89, 35, 35, 35, 35, 37, 37, 37, 37,
37, 37, 37, 37, 41, 41, 41, 41, 57, 57, 41, 41, 41, 41, 58, 58, 58, 58, 81, 171,
57, 57, 80, 170, 169, 80, 81, 81, 81, 81, 170, 81, 82, 82, 82, 82, 94, 169, 94, 94,
93, 168, 93, 93, 167, 166, 165, 164, 163, 162, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159,
161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149,
151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139,
141, 140, 139, 138, 136, 135, 134, 133, 132, 131, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128,
130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118,
120, 119, 118, 117, 114, 113, 112, 111, 110, 109, 115, 114, 113, 112, 111, 110, 109, 108, 107, 104,
108, 107, 106, 103, 102, 99, 98, 97, 96, 59, 103, 100, 99, 98, 97, 60, 60, 96, 93, 92,
59, 95, 92, 91, 90, 89, 79, 78, 71, 70, 91, 90, 80, 79, 72, 71, 68, 67, 66, 65,
67, 66, 65, 64, 60, 47, 46, 187, 42, 42, 61, 47, 46, 188, 42, 42, 36, 36, 9, 188,
36, 36, 9, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 187, 187, 187 188
} ; } ;
static yyconst flex_int16_t yy_chk[286] = static yyconst flex_int16_t yy_chk[282] =
{ 0, { 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, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 5, 5, 6, 6, 14, 17, 17, 18, 1, 1, 5, 5, 6, 6, 14, 17, 17, 18,
192, 17, 19, 18, 19, 19, 24, 5, 18, 6, 20, 17, 20, 18, 29, 193, 24, 5, 18, 6,
24, 20, 14, 20, 29, 32, 14, 32, 33, 19, 24, 32, 14, 32, 33, 184, 14, 19, 183, 19,
53, 53, 183, 19, 182, 48, 181, 48, 48, 19, 19, 53, 53, 29, 67, 182, 33, 32, 179, 67,
33, 32, 178, 29, 66, 33, 40, 40, 177, 66, 19, 33, 70, 70, 19, 83, 83, 178, 19, 84,
69, 69, 48, 82, 82, 40, 48, 83, 83, 40, 84, 95, 95, 176, 19, 40, 40, 116, 116, 117,
94, 94, 48, 115, 115, 175, 40, 116, 116, 174, 117, 175, 95, 172, 40, 170, 95, 169, 40, 168,
40, 171, 40, 137, 137, 94, 169, 168, 167, 94, 95, 138, 138, 167, 166, 40, 95, 163, 160, 40,
166, 165, 162, 159, 158, 94, 188, 188, 188, 188, 159, 40, 189, 189, 189, 189, 190, 190, 190, 190,
189, 189, 189, 189, 190, 190, 190, 190, 191, 191, 191, 191, 191, 191, 192, 192, 192, 192, 194, 158,
191, 191, 193, 157, 156, 193, 194, 194, 194, 194, 157, 194, 195, 195, 195, 195, 196, 156, 196, 196,
195, 155, 195, 195, 154, 153, 152, 151, 150, 149, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146,
148, 147, 146, 145, 144, 142, 140, 139, 138, 134, 145, 143, 141, 140, 139, 135, 134, 133, 132, 131,
133, 132, 131, 130, 129, 126, 125, 124, 123, 122, 130, 127, 126, 125, 124, 123, 122, 121, 120, 119,
121, 120, 119, 118, 113, 112, 111, 110, 108, 107, 114, 113, 112, 111, 109, 108, 107, 106, 105, 104,
106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 103, 102, 101, 100, 99, 98, 93, 92, 91, 90,
92, 91, 90, 89, 78, 77, 76, 75, 74, 73, 79, 78, 77, 76, 75, 74, 73, 72, 71, 69,
72, 71, 70, 68, 67, 65, 64, 63, 62, 58, 68, 66, 65, 64, 63, 59, 58, 56, 45, 44,
57, 55, 45, 44, 43, 42, 36, 34, 31, 30, 43, 42, 36, 34, 31, 30, 28, 27, 26, 25,
28, 27, 26, 25, 22, 16, 15, 9, 8, 7, 22, 16, 15, 9, 8, 7, 4, 3, 188, 188,
4, 3, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
187, 187, 187, 187, 187 188
} ; } ;
/* Table of booleans, true if rule could match eol. */ /* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[59] = static yyconst flex_int32_t yy_rule_can_match_eol[60] =
{ 0, { 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
/* The intent behind this definition is that it'll catch /* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed. * any uses of REJECT which flex missed.
@ -675,7 +676,7 @@ static char *lb_steal(lex_buf *lb)
#line 679 "../../../lib/config/config_lexer.cc" #line 680 "config_lexer.cc"
#define INITIAL 0 #define INITIAL 0
#define C_COMMENT 1 #define C_COMMENT 1
@ -932,7 +933,7 @@ YY_DECL
lex_buf string_buf; lex_buf string_buf;
#line 936 "../../../lib/config/config_lexer.cc" #line 937 "config_lexer.cc"
yylval = yylval_param; yylval = yylval_param;
@ -989,13 +990,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 188 ) if ( yy_current_state >= 189 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp; ++yy_cp;
} }
while ( yy_current_state != 187 ); while ( yy_current_state != 188 );
yy_cp = yyg->yy_last_accepting_cpos; yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state; yy_current_state = yyg->yy_last_accepting_state;
@ -1323,17 +1324,17 @@ YY_RULE_SETUP
case 48: case 48:
YY_RULE_SETUP YY_RULE_SETUP
#line 216 "config_lexer.ll" #line 216 "config_lexer.ll"
{ yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; } { yylval->num = strtod(yytext, NULL) * 60 * 60 * 24; return T_NUMBER; }
YY_BREAK YY_BREAK
case 49: case 49:
YY_RULE_SETUP YY_RULE_SETUP
#line 217 "config_lexer.ll" #line 217 "config_lexer.ll"
{ yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; } { yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; }
YY_BREAK YY_BREAK
case 50: case 50:
YY_RULE_SETUP YY_RULE_SETUP
#line 218 "config_lexer.ll" #line 218 "config_lexer.ll"
{ yylval->num = strtod(yytext, NULL); return T_NUMBER; } { yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; }
YY_BREAK YY_BREAK
case 51: case 51:
YY_RULE_SETUP YY_RULE_SETUP
@ -1343,40 +1344,45 @@ YY_RULE_SETUP
case 52: case 52:
YY_RULE_SETUP YY_RULE_SETUP
#line 220 "config_lexer.ll" #line 220 "config_lexer.ll"
{ yylval->op = OperatorSet; return T_EQUAL; } { yylval->num = strtod(yytext, NULL); return T_NUMBER; }
YY_BREAK YY_BREAK
case 53: case 53:
YY_RULE_SETUP YY_RULE_SETUP
#line 221 "config_lexer.ll" #line 221 "config_lexer.ll"
{ yylval->op = OperatorPlus; return T_PLUS_EQUAL; } { yylval->op = OperatorSet; return T_EQUAL; }
YY_BREAK YY_BREAK
case 54: case 54:
YY_RULE_SETUP YY_RULE_SETUP
#line 222 "config_lexer.ll" #line 222 "config_lexer.ll"
{ yylval->op = OperatorMinus; return T_MINUS_EQUAL; } { yylval->op = OperatorPlus; return T_PLUS_EQUAL; }
YY_BREAK YY_BREAK
case 55: case 55:
YY_RULE_SETUP YY_RULE_SETUP
#line 223 "config_lexer.ll" #line 223 "config_lexer.ll"
{ yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; } { yylval->op = OperatorMinus; return T_MINUS_EQUAL; }
YY_BREAK YY_BREAK
case 56: case 56:
YY_RULE_SETUP YY_RULE_SETUP
#line 224 "config_lexer.ll" #line 224 "config_lexer.ll"
{ yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; }
YY_BREAK
case 57:
YY_RULE_SETUP
#line 225 "config_lexer.ll"
{ yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; } { yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; }
YY_BREAK YY_BREAK
case 57:
YY_RULE_SETUP
#line 227 "config_lexer.ll"
return yytext[0];
YY_BREAK
case 58: case 58:
YY_RULE_SETUP YY_RULE_SETUP
#line 229 "config_lexer.ll" #line 228 "config_lexer.ll"
return yytext[0];
YY_BREAK
case 59:
YY_RULE_SETUP
#line 230 "config_lexer.ll"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 1380 "../../../lib/config/config_lexer.cc" #line 1386 "config_lexer.cc"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(C_COMMENT): case YY_STATE_EOF(C_COMMENT):
case YY_STATE_EOF(STRING): case YY_STATE_EOF(STRING):
@ -1674,7 +1680,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 188 ) if ( yy_current_state >= 189 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@ -1703,11 +1709,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 188 ) if ( yy_current_state >= 189 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 187); yy_is_jam = (yy_current_state == 188);
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
@ -2566,7 +2572,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables" #define YYTABLES_NAME "yytables"
#line 229 "config_lexer.ll" #line 230 "config_lexer.ll"

View File

@ -213,6 +213,7 @@ set return T_SET;
[a-zA-Z_][:a-zA-Z0-9\-_]* { yylval->text = strdup(yytext); return T_IDENTIFIER; } [a-zA-Z_][:a-zA-Z0-9\-_]* { yylval->text = strdup(yytext); return T_IDENTIFIER; }
\<[^\>]*\> { yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING_ANGLE; } \<[^\>]*\> { yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING_ANGLE; }
-?[0-9]+(\.[0-9]+)?ms { yylval->num = strtod(yytext, NULL) / 1000; return T_NUMBER; } -?[0-9]+(\.[0-9]+)?ms { yylval->num = strtod(yytext, NULL) / 1000; return T_NUMBER; }
-?[0-9]+(\.[0-9]+)?d { yylval->num = strtod(yytext, NULL) * 60 * 60 * 24; return T_NUMBER; }
-?[0-9]+(\.[0-9]+)?h { yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; } -?[0-9]+(\.[0-9]+)?h { yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; }
-?[0-9]+(\.[0-9]+)?m { yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; } -?[0-9]+(\.[0-9]+)?m { yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; }
-?[0-9]+(\.[0-9]+)?s { yylval->num = strtod(yytext, NULL); return T_NUMBER; } -?[0-9]+(\.[0-9]+)?s { yylval->num = strtod(yytext, NULL); return T_NUMBER; }