diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-11-26 22:23:30 +0000 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-11-26 22:24:04 +0000 |
commit | 2dad2bdd974e6964e739f9bd09c7ad2c4025d00b (patch) | |
tree | 35f0269f8718a42eaf746d15fa8903f4ef3a7822 /lexer.gen.c | |
parent | d56370f734a2195fb473b8809f40358b024bb073 (diff) | |
parent | 0923c79fee215ee6c01c3d2f822b6267ad29090e (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'lexer.gen.c')
-rw-r--r-- | lexer.gen.c | 243 |
1 files changed, 130 insertions, 113 deletions
diff --git a/lexer.gen.c b/lexer.gen.c index c78730e3..250fc430 100644 --- a/lexer.gen.c +++ b/lexer.gen.c @@ -358,8 +358,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 35 -#define YY_END_OF_BUFFER 36 +#define YY_NUM_RULES 36 +#define YY_END_OF_BUFFER 37 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -367,17 +367,19 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[88] = +static yyconst flex_int16_t yy_accept[96] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 36, 34, 33, 33, 34, 26, 1, 22, - 23, 24, 22, 22, 22, 22, 22, 25, 22, 22, - 22, 32, 32, 32, 32, 32, 32, 32, 22, 30, - 30, 28, 31, 33, 2, 1, 17, 15, 25, 16, - 0, 13, 18, 20, 3, 21, 32, 32, 4, 32, - 32, 32, 6, 11, 32, 14, 30, 29, 27, 29, - 0, 25, 19, 10, 5, 32, 32, 12, 32, 0, - 29, 9, 8, 7, 29, 29, 0 + 0, 0, 37, 35, 34, 34, 35, 27, 1, 23, + 24, 25, 23, 23, 23, 23, 23, 26, 23, 23, + 23, 33, 33, 33, 33, 33, 33, 33, 33, 23, + 31, 31, 29, 32, 34, 2, 1, 17, 15, 26, + 16, 0, 13, 18, 20, 3, 21, 33, 33, 4, + 33, 33, 33, 33, 6, 11, 33, 14, 31, 30, + 28, 30, 0, 26, 19, 10, 33, 5, 33, 33, + 12, 33, 0, 30, 33, 9, 8, 7, 30, 33, + 30, 33, 33, 22, 0 + } ; static yyconst flex_int32_t yy_ec[256] = @@ -391,11 +393,11 @@ static yyconst flex_int32_t yy_ec[256] = 21, 22, 1, 1, 23, 23, 23, 23, 24, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 25, 26, 27, 1, 28, 1, 29, 23, 23, 30, + 25, 26, 27, 1, 28, 1, 29, 23, 30, 31, - 31, 32, 23, 33, 34, 23, 23, 35, 23, 36, - 37, 23, 23, 38, 39, 40, 41, 23, 23, 23, - 23, 23, 42, 43, 44, 1, 1, 1, 1, 1, + 32, 33, 23, 34, 35, 23, 23, 36, 23, 37, + 38, 23, 23, 39, 40, 41, 42, 23, 23, 23, + 23, 23, 43, 44, 45, 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, @@ -412,91 +414,97 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[45] = +static yyconst flex_int32_t yy_meta[46] = { 0, 1, 1, 2, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 4, 4, 1, 5, 1, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 1, 1, 1 + 4, 4, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[97] = +static yyconst flex_int16_t yy_base[105] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 42, 43, 144, 145, 48, 50, 122, 145, 0, 145, - 145, 145, 121, 120, 39, 40, 42, 50, 119, 118, - 117, 0, 23, 91, 37, 88, 78, 77, 80, 0, - 0, 145, 38, 73, 145, 0, 145, 145, 63, 145, - 71, 79, 145, 145, 145, 145, 0, 69, 0, 66, - 27, 67, 0, 0, 65, 145, 0, 69, 145, 67, - 75, 74, 145, 0, 0, 58, 58, 0, 50, 61, - 58, 0, 0, 0, 56, 51, 145, 102, 108, 111, - 117, 123, 126, 128, 130, 132 - + 43, 44, 152, 153, 49, 51, 130, 153, 0, 153, + 153, 153, 129, 128, 40, 41, 43, 51, 127, 126, + 125, 0, 23, 107, 112, 35, 110, 88, 91, 100, + 0, 0, 153, 39, 74, 153, 0, 153, 153, 63, + 153, 72, 94, 153, 153, 153, 153, 0, 75, 0, + 68, 71, 27, 72, 0, 0, 70, 153, 0, 75, + 153, 74, 82, 81, 153, 0, 56, 0, 63, 62, + 0, 56, 65, 66, 62, 0, 0, 0, 64, 53, + 59, 45, 39, 0, 153, 107, 113, 116, 122, 128, + + 131, 133, 135, 137 } ; -static yyconst flex_int16_t yy_def[97] = +static yyconst flex_int16_t yy_def[105] = { 0, - 87, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 88, 88, 87, 87, 87, 87, 87, 87, 89, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 90, 90, 90, 90, 90, 90, 90, 87, 91, - 91, 87, 92, 87, 87, 89, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 87, 91, 87, 87, 93, - 87, 87, 87, 90, 90, 90, 90, 90, 90, 92, - 94, 90, 90, 90, 95, 96, 0, 87, 87, 87, - 87, 87, 87, 87, 87, 87 - + 95, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 96, 96, 95, 95, 95, 95, 95, 95, 97, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 98, 98, 98, 98, 98, 98, 98, 98, 95, + 99, 99, 95, 100, 95, 95, 97, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 95, 99, 95, + 95, 101, 95, 95, 95, 98, 98, 98, 98, 98, + 98, 98, 100, 102, 98, 98, 98, 98, 103, 98, + 104, 98, 98, 98, 0, 95, 95, 95, 95, 95, + + 95, 95, 95, 95 } ; -static yyconst flex_int16_t yy_nxt[190] = +static yyconst flex_int16_t yy_nxt[199] = { 0, 14, 15, 16, 14, 17, 18, 19, 20, 21, 22, 23, 24, 20, 25, 26, 27, 28, 20, 20, 29, 30, 31, 32, 32, 21, 14, 22, 32, 33, 34, - 35, 32, 32, 36, 32, 32, 37, 32, 32, 38, - 32, 21, 39, 22, 41, 41, 69, 42, 42, 44, - 44, 44, 44, 49, 49, 49, 49, 52, 58, 50, - 76, 59, 53, 51, 49, 77, 49, 43, 43, 87, - 51, 61, 62, 51, 44, 44, 80, 49, 70, 49, - 51, 80, 71, 80, 71, 84, 51, 72, 83, 82, - 72, 72, 80, 51, 80, 79, 78, 75, 74, 73, - - 66, 70, 40, 40, 40, 40, 40, 40, 46, 65, - 46, 46, 46, 46, 57, 64, 57, 67, 67, 63, - 67, 60, 67, 68, 68, 68, 68, 68, 68, 81, - 81, 85, 85, 86, 86, 68, 68, 56, 55, 54, - 48, 47, 45, 87, 13, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87 + 35, 36, 32, 32, 37, 32, 32, 38, 32, 32, + 39, 32, 21, 40, 22, 42, 42, 71, 43, 43, + 45, 45, 45, 45, 50, 50, 50, 50, 53, 59, + 51, 79, 60, 54, 52, 50, 80, 50, 44, 44, + 63, 64, 52, 95, 52, 45, 45, 50, 94, 50, + 72, 93, 52, 73, 83, 73, 52, 92, 74, 83, + 90, 83, 88, 87, 52, 86, 85, 74, 74, 83, + + 83, 82, 81, 78, 77, 76, 72, 41, 41, 41, + 41, 41, 41, 47, 75, 47, 47, 47, 47, 58, + 68, 58, 69, 69, 67, 69, 66, 69, 70, 70, + 70, 70, 70, 70, 84, 84, 89, 89, 91, 91, + 70, 70, 65, 62, 61, 57, 56, 55, 49, 48, + 46, 95, 13, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95 + } ; -static yyconst flex_int16_t yy_chk[190] = +static yyconst flex_int16_t yy_chk[199] = { 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, 11, 12, 43, 11, 12, 15, - 15, 16, 16, 25, 26, 25, 26, 27, 33, 25, - 61, 33, 27, 26, 28, 61, 28, 11, 12, 80, - 26, 35, 35, 28, 44, 44, 86, 49, 43, 49, - 28, 85, 51, 81, 51, 79, 49, 51, 77, 76, - 72, 71, 70, 49, 68, 65, 62, 60, 58, 52, - - 39, 80, 88, 88, 88, 88, 88, 88, 89, 38, - 89, 89, 89, 89, 90, 37, 90, 91, 91, 36, - 91, 34, 91, 92, 92, 92, 92, 92, 92, 93, - 93, 94, 94, 95, 95, 96, 96, 31, 30, 29, - 24, 23, 17, 13, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87 + 1, 1, 1, 1, 1, 11, 12, 44, 11, 12, + 15, 15, 16, 16, 25, 26, 25, 26, 27, 33, + 25, 63, 33, 27, 26, 28, 63, 28, 11, 12, + 36, 36, 26, 83, 28, 45, 45, 50, 93, 50, + 44, 92, 28, 52, 91, 52, 50, 90, 52, 89, + 85, 84, 82, 80, 50, 79, 77, 74, 73, 72, + + 70, 67, 64, 62, 61, 59, 83, 96, 96, 96, + 96, 96, 96, 97, 53, 97, 97, 97, 97, 98, + 40, 98, 99, 99, 39, 99, 38, 99, 100, 100, + 100, 100, 100, 100, 101, 101, 102, 102, 103, 103, + 104, 104, 37, 35, 34, 31, 30, 29, 24, 23, + 17, 13, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95 + } ; /* The intent behind this definition is that it'll catch @@ -530,7 +538,7 @@ struct lexer_param; static int enter(int opening, int state, yyscan_t yyscanner); static int try_exit(int closing, int state, yyscan_t yyscanner); #define YY_NO_INPUT 1 -#line 534 "lexer.gen.c" +#line 542 "lexer.gen.c" #define INITIAL 0 #define IN_PAREN 1 @@ -786,7 +794,7 @@ YY_DECL #line 35 "lexer.l" -#line 790 "lexer.gen.c" +#line 798 "lexer.gen.c" yylval = yylval_param; @@ -843,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 >= 88 ) + if ( yy_current_state >= 96 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 145 ); + while ( yy_base[yy_current_state] != 153 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -981,57 +989,62 @@ YY_RULE_SETUP case 22: YY_RULE_SETUP #line 59 "lexer.l" -{ return yytext[0];} +{ return CONTAINS; } YY_BREAK case 23: YY_RULE_SETUP -#line 61 "lexer.l" +#line 60 "lexer.l" +{ return yytext[0];} + YY_BREAK +case 24: +YY_RULE_SETUP +#line 62 "lexer.l" { return enter(yytext[0], YY_START, yyscanner); } YY_BREAK -case 24: +case 25: YY_RULE_SETUP -#line 65 "lexer.l" +#line 66 "lexer.l" { return try_exit(yytext[0], YY_START, yyscanner); } YY_BREAK -case 25: +case 26: YY_RULE_SETUP -#line 70 "lexer.l" +#line 71 "lexer.l" { yylval->literal = jv_parse_sized(yytext, yyleng); return LITERAL; } YY_BREAK -case 26: +case 27: YY_RULE_SETUP -#line 74 "lexer.l" +#line 75 "lexer.l" { yy_push_state(IN_QQSTRING, yyscanner); return QQSTRING_START; } YY_BREAK -case 27: +case 28: YY_RULE_SETUP -#line 80 "lexer.l" +#line 81 "lexer.l" { return enter(QQSTRING_INTERP_START, YY_START, yyscanner); } YY_BREAK -case 28: +case 29: YY_RULE_SETUP -#line 83 "lexer.l" +#line 84 "lexer.l" { yy_pop_state(yyscanner); return QQSTRING_END; } YY_BREAK -case 29: -/* rule 29 can match eol */ +case 30: +/* rule 30 can match eol */ YY_RULE_SETUP -#line 87 "lexer.l" +#line 88 "lexer.l" { /* pass escapes to the json parser */ jv escapes = jv_string_fmt("\"%.*s\"", yyleng, yytext); @@ -1040,45 +1053,45 @@ YY_RULE_SETUP return QQSTRING_TEXT; } YY_BREAK -case 30: -/* rule 30 can match eol */ +case 31: +/* rule 31 can match eol */ YY_RULE_SETUP -#line 94 "lexer.l" +#line 95 "lexer.l" { yylval->literal = jv_string_sized(yytext, yyleng); return QQSTRING_TEXT; } YY_BREAK -case 31: +case 32: YY_RULE_SETUP -#line 98 "lexer.l" +#line 99 "lexer.l" { return INVALID_CHARACTER; } YY_BREAK -case 32: +case 33: YY_RULE_SETUP -#line 104 "lexer.l" +#line 105 "lexer.l" { yylval->literal = jv_string(yytext); return IDENT;} YY_BREAK -case 33: -/* rule 33 can match eol */ +case 34: +/* rule 34 can match eol */ YY_RULE_SETUP -#line 106 "lexer.l" +#line 107 "lexer.l" {} YY_BREAK -case 34: +case 35: YY_RULE_SETUP -#line 108 "lexer.l" +#line 109 "lexer.l" { return INVALID_CHARACTER; } YY_BREAK -case 35: +case 36: YY_RULE_SETUP -#line 110 "lexer.l" +#line 111 "lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1082 "lexer.gen.c" +#line 1095 "lexer.gen.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(IN_PAREN): case YY_STATE_EOF(IN_BRACKET): @@ -1377,7 +1390,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) 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 >= 88 ) + if ( yy_current_state >= 96 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1406,11 +1419,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) 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 >= 88 ) + if ( yy_current_state >= 96 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 87); + yy_is_jam = (yy_current_state == 95); return yy_is_jam ? 0 : yy_current_state; } @@ -2264,7 +2277,7 @@ void jq_yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 110 "lexer.l" +#line 111 "lexer.l" /* perhaps these should be calls... */ @@ -2285,6 +2298,10 @@ static int try_exit(int c, int state, yyscan_t yyscanner) { match = ')'; ret = QQSTRING_INTERP_END; break; + + default: + // may not be the best error to give + return INVALID_CHARACTER; } assert(match); if (match == c) { |