diff options
Diffstat (limited to 'lexer.gen.c')
-rw-r--r-- | lexer.gen.c | 327 |
1 files changed, 167 insertions, 160 deletions
diff --git a/lexer.gen.c b/lexer.gen.c index a2f55400..2fb747e6 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 33 -#define YY_END_OF_BUFFER 34 +#define YY_NUM_RULES 34 +#define YY_END_OF_BUFFER 35 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -367,35 +367,35 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[84] = +static yyconst flex_int16_t yy_accept[86] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 34, 32, 31, 31, 24, 20, 21, 22, - 20, 20, 20, 20, 20, 23, 20, 20, 20, 30, - 30, 30, 30, 30, 30, 30, 20, 28, 28, 26, - 29, 31, 15, 13, 23, 14, 0, 11, 16, 18, - 1, 19, 30, 30, 2, 30, 30, 30, 4, 9, - 30, 12, 28, 27, 25, 27, 0, 23, 17, 8, - 3, 30, 30, 10, 30, 0, 27, 7, 6, 5, - 27, 27, 0 + 0, 0, 35, 33, 32, 32, 25, 1, 21, 22, + 23, 21, 21, 21, 21, 21, 24, 21, 21, 21, + 31, 31, 31, 31, 31, 31, 31, 21, 29, 29, + 27, 30, 32, 1, 16, 14, 24, 15, 0, 12, + 17, 19, 2, 20, 31, 31, 3, 31, 31, 31, + 5, 10, 31, 13, 29, 28, 26, 28, 0, 24, + 18, 9, 4, 31, 31, 11, 31, 0, 28, 8, + 7, 6, 28, 28, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 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, 2, 1, 4, 1, 5, 1, 1, 1, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 15, 16, 17, - 18, 19, 1, 1, 20, 20, 20, 20, 21, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 22, 23, 24, 1, 25, 1, 26, 20, 20, 27, - - 28, 29, 20, 30, 31, 20, 20, 32, 20, 33, - 34, 20, 20, 35, 36, 37, 38, 20, 20, 20, - 20, 20, 39, 40, 41, 1, 1, 1, 1, 1, + 1, 2, 1, 5, 6, 7, 1, 1, 1, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, + 20, 21, 1, 1, 22, 22, 22, 22, 23, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 24, 25, 26, 1, 27, 1, 28, 22, 22, 29, + + 30, 31, 22, 32, 33, 22, 22, 34, 22, 35, + 36, 22, 22, 37, 38, 39, 40, 22, 22, 22, + 22, 22, 41, 42, 43, 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,89 +412,91 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[42] = +static yyconst flex_int32_t yy_meta[44] = { 0, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 3, 1, 4, 1, 5, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, - 1 + 1, 1, 2, 2, 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 } ; -static yyconst flex_int16_t yy_base[92] = +static yyconst flex_int16_t yy_base[95] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 39, 41, 132, 133, 44, 46, 133, 133, 133, 133, - 113, 98, 38, 39, 41, 49, 96, 93, 85, 0, - 22, 74, 33, 72, 65, 69, 80, 0, 0, 133, - 51, 66, 133, 133, 59, 133, 65, 79, 133, 133, - 133, 133, 0, 69, 0, 66, 47, 67, 0, 0, - 65, 133, 0, 69, 133, 68, 76, 74, 133, 0, - 0, 57, 57, 0, 51, 66, 59, 0, 0, 0, - 58, 52, 133, 104, 107, 112, 117, 120, 122, 124, - 126 + 41, 42, 142, 143, 46, 48, 143, 0, 143, 143, + 143, 121, 120, 38, 39, 41, 49, 119, 118, 117, + 0, 22, 106, 36, 104, 97, 101, 112, 0, 0, + 143, 51, 71, 0, 143, 143, 62, 143, 64, 96, + 143, 143, 143, 143, 0, 85, 0, 79, 48, 75, + 0, 0, 65, 143, 0, 69, 143, 68, 74, 73, + 143, 0, 0, 57, 57, 0, 49, 56, 58, 0, + 0, 0, 57, 43, 143, 96, 102, 105, 111, 117, + 120, 122, 124, 126 } ; -static yyconst flex_int16_t yy_def[92] = +static yyconst flex_int16_t yy_def[95] = { 0, - 83, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 84, 84, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 85, - 85, 85, 85, 85, 85, 85, 83, 86, 86, 83, - 87, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 83, 86, 83, 83, 88, 83, 83, 83, 85, - 85, 85, 85, 85, 85, 87, 89, 85, 85, 85, - 90, 91, 0, 83, 83, 83, 83, 83, 83, 83, - 83 + 85, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 86, 86, 85, 85, 85, 85, 85, 87, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 88, 88, 88, 88, 88, 88, 88, 85, 89, 89, + 85, 90, 85, 87, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 85, 89, 85, 85, 91, 85, 85, + 85, 88, 88, 88, 88, 88, 88, 90, 92, 88, + 88, 88, 93, 94, 0, 85, 85, 85, 85, 85, + 85, 85, 85, 85 } ; -static yyconst flex_int16_t yy_nxt[175] = +static yyconst flex_int16_t yy_nxt[187] = { 0, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 18, - 23, 24, 25, 26, 18, 18, 27, 28, 29, 30, - 30, 19, 14, 20, 30, 31, 32, 33, 30, 30, - 34, 30, 30, 35, 30, 30, 36, 30, 19, 37, - 20, 39, 40, 39, 40, 42, 42, 42, 42, 45, - 45, 45, 45, 48, 54, 46, 65, 55, 49, 47, - 45, 41, 45, 41, 57, 58, 47, 42, 42, 47, - 45, 83, 45, 67, 76, 67, 47, 72, 68, 47, - 76, 76, 73, 80, 79, 78, 47, 68, 66, 68, - 76, 76, 75, 74, 71, 70, 69, 62, 61, 60, - - 59, 56, 52, 66, 38, 38, 38, 38, 38, 53, - 51, 53, 63, 50, 63, 44, 63, 64, 64, 64, - 64, 64, 77, 77, 81, 81, 82, 82, 64, 64, - 43, 83, 13, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83 + 14, 15, 16, 14, 17, 18, 19, 20, 21, 22, + 23, 19, 24, 25, 26, 27, 19, 19, 28, 29, + 30, 31, 31, 20, 14, 21, 31, 32, 33, 34, + 31, 31, 35, 31, 31, 36, 31, 31, 37, 31, + 20, 38, 21, 40, 40, 41, 41, 43, 43, 43, + 43, 47, 47, 47, 47, 50, 56, 48, 67, 57, + 51, 49, 47, 85, 47, 42, 42, 78, 49, 59, + 60, 49, 43, 43, 69, 47, 69, 47, 49, 70, + 74, 78, 78, 82, 49, 75, 81, 80, 70, 70, + 68, 49, 78, 78, 77, 68, 39, 39, 39, 39, + + 39, 39, 44, 76, 44, 44, 44, 44, 55, 73, + 55, 65, 65, 72, 65, 71, 65, 66, 66, 66, + 66, 66, 66, 79, 79, 83, 83, 84, 84, 66, + 66, 64, 63, 62, 61, 58, 54, 53, 52, 46, + 45, 85, 13, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85 } ; -static yyconst flex_int16_t yy_chk[175] = +static yyconst flex_int16_t yy_chk[187] = { 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, 11, 11, 12, 12, 15, 15, 16, 16, 23, - 24, 23, 24, 25, 31, 23, 41, 31, 25, 24, - 26, 11, 26, 12, 33, 33, 24, 42, 42, 26, - 45, 76, 45, 47, 82, 47, 26, 57, 47, 45, - 81, 77, 57, 75, 73, 72, 45, 68, 41, 67, - 66, 64, 61, 58, 56, 54, 48, 37, 36, 35, - - 34, 32, 29, 76, 84, 84, 84, 84, 84, 85, - 28, 85, 86, 27, 86, 22, 86, 87, 87, 87, - 87, 87, 88, 88, 89, 89, 90, 90, 91, 91, - 21, 13, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83 + 1, 1, 1, 11, 12, 11, 12, 15, 15, 16, + 16, 24, 25, 24, 25, 26, 32, 24, 42, 32, + 26, 25, 27, 78, 27, 11, 12, 84, 25, 34, + 34, 27, 43, 43, 49, 47, 49, 47, 27, 49, + 59, 83, 79, 77, 47, 59, 75, 74, 70, 69, + 42, 47, 68, 66, 63, 78, 86, 86, 86, 86, + + 86, 86, 87, 60, 87, 87, 87, 87, 88, 58, + 88, 89, 89, 56, 89, 50, 89, 90, 90, 90, + 90, 90, 90, 91, 91, 92, 92, 93, 93, 94, + 94, 38, 37, 36, 35, 33, 30, 29, 28, 23, + 22, 13, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85 } ; /* The intent behind this definition is that it'll catch @@ -525,7 +527,7 @@ static yyconst flex_int16_t yy_chk[175] = 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 529 "lexer.gen.c" +#line 531 "lexer.gen.c" #define INITIAL 0 #define IN_PAREN 1 @@ -781,7 +783,7 @@ YY_DECL #line 32 "lexer.l" -#line 785 "lexer.gen.c" +#line 787 "lexer.gen.c" yylval = yylval_param; @@ -838,13 +840,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 >= 84 ) + if ( yy_current_state >= 86 ) 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] != 133 ); + while ( yy_base[yy_current_state] != 143 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -871,152 +873,157 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP #line 34 "lexer.l" -{ return EQ; } +{ /* comments */ } YY_BREAK case 2: YY_RULE_SETUP -#line 35 "lexer.l" -{ return AS; } +#line 36 "lexer.l" +{ return EQ; } YY_BREAK case 3: YY_RULE_SETUP -#line 36 "lexer.l" -{ return DEF; } +#line 37 "lexer.l" +{ return AS; } YY_BREAK case 4: YY_RULE_SETUP -#line 37 "lexer.l" -{ return IF; } +#line 38 "lexer.l" +{ return DEF; } YY_BREAK case 5: YY_RULE_SETUP -#line 38 "lexer.l" -{ return THEN; } +#line 39 "lexer.l" +{ return IF; } YY_BREAK case 6: YY_RULE_SETUP -#line 39 "lexer.l" -{ return ELSE; } +#line 40 "lexer.l" +{ return THEN; } YY_BREAK case 7: YY_RULE_SETUP -#line 40 "lexer.l" -{ return ELSE_IF; } +#line 41 "lexer.l" +{ return ELSE; } YY_BREAK case 8: YY_RULE_SETUP -#line 41 "lexer.l" -{ return AND; } +#line 42 "lexer.l" +{ return ELSE_IF; } YY_BREAK case 9: YY_RULE_SETUP -#line 42 "lexer.l" -{ return OR; } +#line 43 "lexer.l" +{ return AND; } YY_BREAK case 10: YY_RULE_SETUP -#line 43 "lexer.l" -{ return END; } +#line 44 "lexer.l" +{ return OR; } YY_BREAK case 11: YY_RULE_SETUP -#line 44 "lexer.l" -{ return DEFINEDOR; } +#line 45 "lexer.l" +{ return END; } YY_BREAK case 12: YY_RULE_SETUP -#line 45 "lexer.l" -{ return SETPIPE; } +#line 46 "lexer.l" +{ return DEFINEDOR; } YY_BREAK case 13: YY_RULE_SETUP -#line 46 "lexer.l" -{ return SETPLUS; } +#line 47 "lexer.l" +{ return SETPIPE; } YY_BREAK case 14: YY_RULE_SETUP -#line 47 "lexer.l" -{ return SETMINUS; } +#line 48 "lexer.l" +{ return SETPLUS; } YY_BREAK case 15: YY_RULE_SETUP -#line 48 "lexer.l" -{ return SETMULT; } +#line 49 "lexer.l" +{ return SETMINUS; } YY_BREAK case 16: YY_RULE_SETUP -#line 49 "lexer.l" -{ return SETDIV; } +#line 50 "lexer.l" +{ return SETMULT; } YY_BREAK case 17: YY_RULE_SETUP -#line 50 "lexer.l" -{ return SETDEFINEDOR; } +#line 51 "lexer.l" +{ return SETDIV; } YY_BREAK case 18: YY_RULE_SETUP -#line 51 "lexer.l" -{ return LESSEQ; } +#line 52 "lexer.l" +{ return SETDEFINEDOR; } YY_BREAK case 19: YY_RULE_SETUP -#line 52 "lexer.l" -{ return GREATEREQ; } +#line 53 "lexer.l" +{ return LESSEQ; } YY_BREAK case 20: YY_RULE_SETUP -#line 53 "lexer.l" -{ return yytext[0];} +#line 54 "lexer.l" +{ return GREATEREQ; } YY_BREAK case 21: YY_RULE_SETUP #line 55 "lexer.l" +{ return yytext[0];} + YY_BREAK +case 22: +YY_RULE_SETUP +#line 57 "lexer.l" { return enter(yytext[0], YY_START, yyscanner); } YY_BREAK -case 22: +case 23: YY_RULE_SETUP -#line 59 "lexer.l" +#line 61 "lexer.l" { return try_exit(yytext[0], YY_START, yyscanner); } YY_BREAK -case 23: +case 24: YY_RULE_SETUP -#line 64 "lexer.l" +#line 66 "lexer.l" { yylval->literal = jv_parse_sized(yytext, yyleng); return LITERAL; } YY_BREAK -case 24: +case 25: YY_RULE_SETUP -#line 68 "lexer.l" +#line 70 "lexer.l" { yy_push_state(IN_QQSTRING, yyscanner); return QQSTRING_START; } YY_BREAK -case 25: +case 26: YY_RULE_SETUP -#line 74 "lexer.l" +#line 76 "lexer.l" { return enter(QQSTRING_INTERP_START, YY_START, yyscanner); } YY_BREAK -case 26: +case 27: YY_RULE_SETUP -#line 77 "lexer.l" +#line 79 "lexer.l" { yy_pop_state(yyscanner); return QQSTRING_END; } YY_BREAK -case 27: -/* rule 27 can match eol */ +case 28: +/* rule 28 can match eol */ YY_RULE_SETUP -#line 81 "lexer.l" +#line 83 "lexer.l" { /* pass escapes to the json parser */ jv escapes = jv_string_fmt("\"%.*s\"", yyleng, yytext); @@ -1025,45 +1032,45 @@ YY_RULE_SETUP return QQSTRING_TEXT; } YY_BREAK -case 28: -/* rule 28 can match eol */ +case 29: +/* rule 29 can match eol */ YY_RULE_SETUP -#line 88 "lexer.l" +#line 90 "lexer.l" { yylval->literal = jv_string_sized(yytext, yyleng); return QQSTRING_TEXT; } YY_BREAK -case 29: +case 30: YY_RULE_SETUP -#line 92 "lexer.l" +#line 94 "lexer.l" { return INVALID_CHARACTER; } YY_BREAK -case 30: -YY_RULE_SETUP -#line 98 "lexer.l" -{ yylval->literal = jv_string(yytext); return IDENT;} - YY_BREAK case 31: -/* rule 31 can match eol */ YY_RULE_SETUP #line 100 "lexer.l" -{} +{ yylval->literal = jv_string(yytext); return IDENT;} YY_BREAK case 32: +/* rule 32 can match eol */ YY_RULE_SETUP #line 102 "lexer.l" -{ return INVALID_CHARACTER; } +{} YY_BREAK case 33: YY_RULE_SETUP #line 104 "lexer.l" +{ return INVALID_CHARACTER; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 106 "lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1067 "lexer.gen.c" +#line 1074 "lexer.gen.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(IN_PAREN): case YY_STATE_EOF(IN_BRACKET): @@ -1362,7 +1369,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 >= 84 ) + if ( yy_current_state >= 86 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1391,11 +1398,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 >= 84 ) + if ( yy_current_state >= 86 ) 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 == 83); + yy_is_jam = (yy_current_state == 85); return yy_is_jam ? 0 : yy_current_state; } @@ -2249,7 +2256,7 @@ void jq_yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 104 "lexer.l" +#line 106 "lexer.l" /* perhaps these should be calls... */ |