From c8a7610a9074943be411f2fc92b91e0838eb4acb Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Fri, 17 Sep 2010 12:16:58 +0200 Subject: [PATCH] Bugfix on parsing fields. --- src/lexycal.fl | 2 +- src/lexycal.yy.c | 43 ++++++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/lexycal.fl b/src/lexycal.fl index b26d54c..87b7068 100644 --- a/src/lexycal.fl +++ b/src/lexycal.fl @@ -28,7 +28,7 @@ DIGIT [0-9] return STRING; } -"[".+"]" { +"["[^\]]+"]" { /*printf ("A field: %s\n", yytext);*/ yylval = g_strdup (yytext); return FIELD; diff --git a/src/lexycal.yy.c b/src/lexycal.yy.c index f92b546..8c05341 100644 --- a/src/lexycal.yy.c +++ b/src/lexycal.yy.c @@ -421,59 +421,59 @@ static yyconst flex_int32_t yy_ec[256] = static yyconst flex_int32_t yy_meta[31] = { 0, - 1, 2, 3, 1, 1, 3, 1, 1, 1, 1, - 1, 1, 3, 1, 3, 3, 3, 3, 1, 1, - 3, 3, 3, 3, 3, 3, 3, 3, 1, 1 + 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 2, 1, 2, 2, 2, 2, 1, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 1, 1 } ; static yyconst flex_int16_t yy_base[48] = { 0, - 0, 0, 79, 80, 80, 74, 80, 20, 18, 34, - 0, 73, 80, 63, 28, 53, 52, 48, 39, 65, - 40, 51, 57, 41, 44, 41, 80, 46, 42, 41, - 40, 33, 34, 31, 29, 80, 21, 14, 80, 8, - 80, 80, 46, 29, 49, 52, 55 + 0, 0, 78, 79, 79, 73, 79, 20, 18, 34, + 0, 72, 79, 62, 28, 52, 51, 47, 39, 64, + 40, 50, 56, 40, 43, 40, 79, 79, 42, 41, + 40, 33, 34, 31, 29, 79, 28, 14, 79, 8, + 79, 79, 46, 30, 49, 51, 54 } ; static yyconst flex_int16_t yy_def[48] = { 0, 42, 1, 42, 42, 42, 43, 42, 42, 42, 44, 45, 43, 42, 42, 42, 42, 42, 42, 42, 42, - 44, 45, 42, 42, 42, 42, 42, 45, 42, 42, + 44, 45, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 46, 42, 47, 46, 42, 47, 42, 0, 42, 42, 42, 42, 42 } ; -static yyconst flex_int16_t yy_nxt[111] = +static yyconst flex_int16_t yy_nxt[110] = { 0, 4, 4, 5, 6, 7, 7, 7, 7, 7, 7, 4, 7, 8, 9, 10, 10, 10, 10, 11, 4, 4, 10, 10, 10, 10, 10, 10, 10, 4, 4, 14, 21, 15, 16, 17, 18, 19, 41, 14, 20, 15, 19, 19, 39, 20, 20, 12, 12, 12, 22, - 41, 22, 38, 38, 38, 40, 40, 40, 39, 37, - 36, 35, 34, 33, 32, 28, 31, 30, 29, 23, - 28, 27, 26, 25, 24, 23, 13, 13, 42, 3, + 22, 38, 38, 38, 40, 40, 40, 41, 39, 37, + 36, 35, 34, 33, 32, 31, 30, 29, 23, 28, + 27, 26, 25, 24, 23, 13, 13, 42, 3, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 + 42, 42, 42, 42, 42, 42, 42, 42, 42 } ; -static yyconst flex_int16_t yy_chk[111] = +static yyconst flex_int16_t yy_chk[110] = { 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, 8, 44, 8, 9, 9, 9, 10, 40, 15, 10, 15, 19, 21, 38, 19, 21, 43, 43, 43, 45, - 37, 45, 46, 46, 46, 47, 47, 47, 35, 34, - 33, 32, 31, 30, 29, 28, 26, 25, 24, 23, - 22, 20, 18, 17, 16, 14, 12, 6, 3, 42, + 45, 46, 46, 46, 47, 47, 47, 37, 35, 34, + 33, 32, 31, 30, 29, 26, 25, 24, 23, 22, + 20, 18, 17, 16, 14, 12, 6, 3, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 + 42, 42, 42, 42, 42, 42, 42, 42, 42 } ; static yy_state_type yy_last_accepting_state; @@ -746,7 +746,7 @@ yy_match: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 80 ); + while ( yy_base[yy_current_state] != 79 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -799,6 +799,7 @@ YY_RULE_SETUP } YY_BREAK case 4: +/* rule 4 can match eol */ YY_RULE_SETUP #line 31 "lexycal.fl" { @@ -858,7 +859,7 @@ YY_RULE_SETUP #line 62 "lexycal.fl" ECHO; YY_BREAK -#line 862 "lexycal.yy.c" +#line 863 "lexycal.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); -- 2.49.0