|
@@ -351,8 +351,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 29
|
|
|
-#define YY_END_OF_BUFFER 30
|
|
|
+#define YY_NUM_RULES 33
|
|
|
+#define YY_END_OF_BUFFER 34
|
|
|
/* This struct is not used in this scanner,
|
|
|
but its presence is necessary. */
|
|
|
struct yy_trans_info
|
|
@@ -360,13 +360,13 @@ struct yy_trans_info
|
|
|
flex_int32_t yy_verify;
|
|
|
flex_int32_t yy_nxt;
|
|
|
};
|
|
|
-static const flex_int16_t yy_accept[46] =
|
|
|
+static const flex_int16_t yy_accept[51] =
|
|
|
{ 0,
|
|
|
- 0, 0, 0, 0, 0, 0, 30, 21, 20, 19,
|
|
|
- 16, 14, 15, 2, 3, 11, 9, 10, 12, 17,
|
|
|
- 17, 7, 8, 6, 18, 13, 18, 4, 5, 24,
|
|
|
- 22, 23, 28, 27, 26, 25, 0, 17, 18, 18,
|
|
|
- 17, 18, 18, 1, 0
|
|
|
+ 0, 0, 0, 0, 0, 0, 34, 25, 24, 23,
|
|
|
+ 25, 20, 18, 19, 2, 3, 15, 13, 14, 16,
|
|
|
+ 21, 21, 10, 12, 9, 22, 17, 22, 4, 5,
|
|
|
+ 28, 26, 27, 32, 31, 30, 29, 8, 0, 21,
|
|
|
+ 7, 11, 6, 22, 22, 21, 22, 22, 1, 0
|
|
|
} ;
|
|
|
|
|
|
static const YY_CHAR yy_ec[256] =
|
|
@@ -374,17 +374,17 @@ static const YY_CHAR yy_ec[256] =
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
- 1, 3, 1, 4, 5, 1, 1, 1, 6, 7,
|
|
|
- 8, 9, 10, 1, 11, 12, 13, 14, 15, 15,
|
|
|
- 15, 15, 15, 15, 15, 15, 15, 1, 1, 16,
|
|
|
- 17, 18, 1, 1, 19, 19, 19, 19, 19, 19,
|
|
|
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
|
|
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
|
|
|
- 1, 1, 1, 20, 19, 1, 19, 19, 19, 19,
|
|
|
-
|
|
|
- 21, 19, 19, 22, 23, 19, 19, 24, 19, 19,
|
|
|
- 19, 19, 19, 19, 19, 19, 19, 19, 25, 19,
|
|
|
- 19, 19, 26, 1, 27, 1, 1, 1, 1, 1,
|
|
|
+ 1, 3, 4, 5, 6, 1, 1, 1, 7, 8,
|
|
|
+ 9, 10, 11, 1, 12, 13, 14, 15, 16, 16,
|
|
|
+ 16, 16, 16, 16, 16, 16, 16, 1, 1, 17,
|
|
|
+ 18, 19, 1, 1, 20, 20, 20, 20, 20, 20,
|
|
|
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
|
|
|
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
|
|
|
+ 1, 1, 1, 21, 20, 1, 20, 20, 20, 20,
|
|
|
+
|
|
|
+ 22, 20, 20, 23, 24, 20, 20, 25, 20, 20,
|
|
|
+ 20, 20, 20, 20, 20, 20, 20, 20, 26, 20,
|
|
|
+ 20, 20, 27, 1, 28, 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,
|
|
@@ -401,55 +401,61 @@ static const YY_CHAR yy_ec[256] =
|
|
|
1, 1, 1, 1, 1
|
|
|
} ;
|
|
|
|
|
|
-static const YY_CHAR yy_meta[28] =
|
|
|
+static const YY_CHAR yy_meta[29] =
|
|
|
{ 0,
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
- 1, 1, 1, 2, 2, 1, 1, 1, 2, 1,
|
|
|
- 2, 2, 2, 2, 2, 1, 1
|
|
|
+ 1, 1, 1, 1, 2, 2, 1, 1, 1, 2,
|
|
|
+ 1, 2, 2, 2, 2, 2, 1, 1
|
|
|
} ;
|
|
|
|
|
|
-static const flex_int16_t yy_base[49] =
|
|
|
+static const flex_int16_t yy_base[54] =
|
|
|
{ 0,
|
|
|
- 0, 0, 26, 27, 31, 32, 57, 58, 58, 58,
|
|
|
- 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
|
|
|
- 27, 58, 58, 58, 0, 58, 34, 58, 58, 58,
|
|
|
- 58, 58, 58, 58, 58, 58, 29, 33, 0, 32,
|
|
|
- 35, 22, 19, 0, 58, 50, 52, 28
|
|
|
+ 0, 0, 27, 28, 30, 34, 62, 63, 63, 63,
|
|
|
+ 43, 63, 63, 63, 63, 63, 63, 63, 63, 63,
|
|
|
+ 63, 27, 42, 41, 40, 0, 63, 34, 63, 63,
|
|
|
+ 63, 63, 63, 63, 63, 63, 63, 63, 29, 33,
|
|
|
+ 63, 63, 63, 0, 32, 35, 22, 16, 0, 63,
|
|
|
+ 51, 53, 29
|
|
|
} ;
|
|
|
|
|
|
-static const flex_int16_t yy_def[49] =
|
|
|
+static const flex_int16_t yy_def[54] =
|
|
|
{ 0,
|
|
|
- 45, 1, 46, 46, 47, 47, 45, 45, 45, 45,
|
|
|
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
|
|
|
- 45, 45, 45, 45, 48, 45, 48, 45, 45, 45,
|
|
|
- 45, 45, 45, 45, 45, 45, 45, 45, 48, 48,
|
|
|
- 45, 48, 48, 48, 0, 45, 45, 45
|
|
|
+ 50, 1, 51, 51, 52, 52, 50, 50, 50, 50,
|
|
|
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
|
|
|
+ 50, 50, 50, 50, 50, 53, 50, 53, 50, 50,
|
|
|
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
|
|
|
+ 50, 50, 50, 53, 53, 50, 53, 53, 53, 0,
|
|
|
+ 50, 50, 50
|
|
|
} ;
|
|
|
|
|
|
-static const flex_int16_t yy_nxt[86] =
|
|
|
+static const flex_int16_t yy_nxt[92] =
|
|
|
{ 0,
|
|
|
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
|
|
|
- 18, 8, 19, 20, 21, 22, 23, 24, 25, 26,
|
|
|
- 25, 25, 25, 25, 27, 28, 29, 31, 31, 39,
|
|
|
- 32, 32, 34, 34, 35, 35, 36, 36, 37, 44,
|
|
|
- 38, 38, 41, 41, 37, 43, 38, 38, 41, 41,
|
|
|
- 30, 30, 33, 33, 42, 40, 45, 7, 45, 45,
|
|
|
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
|
|
|
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
|
|
|
- 45, 45, 45, 45, 45
|
|
|
+ 18, 19, 8, 20, 21, 22, 23, 24, 25, 26,
|
|
|
+ 27, 26, 26, 26, 26, 28, 29, 30, 32, 32,
|
|
|
+ 44, 35, 33, 33, 36, 35, 37, 49, 36, 39,
|
|
|
+ 37, 40, 40, 46, 46, 39, 48, 40, 40, 46,
|
|
|
+ 46, 31, 31, 34, 34, 47, 45, 43, 42, 41,
|
|
|
+ 38, 50, 7, 50, 50, 50, 50, 50, 50, 50,
|
|
|
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
|
|
|
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
|
|
|
+ 50
|
|
|
+
|
|
|
} ;
|
|
|
|
|
|
-static const flex_int16_t yy_chk[86] =
|
|
|
+static const flex_int16_t yy_chk[92] =
|
|
|
{ 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, 3, 4, 48,
|
|
|
- 3, 4, 5, 6, 5, 6, 5, 6, 21, 43,
|
|
|
- 21, 21, 37, 37, 38, 42, 38, 38, 41, 41,
|
|
|
- 46, 46, 47, 47, 40, 27, 7, 45, 45, 45,
|
|
|
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
|
|
|
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
|
|
|
- 45, 45, 45, 45, 45
|
|
|
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 4,
|
|
|
+ 53, 5, 3, 4, 5, 6, 5, 48, 6, 22,
|
|
|
+ 6, 22, 22, 39, 39, 40, 47, 40, 40, 46,
|
|
|
+ 46, 51, 51, 52, 52, 45, 28, 25, 24, 23,
|
|
|
+ 11, 7, 50, 50, 50, 50, 50, 50, 50, 50,
|
|
|
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
|
|
|
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
|
|
|
+ 50
|
|
|
+
|
|
|
} ;
|
|
|
|
|
|
static yy_state_type yy_last_accepting_state;
|
|
@@ -470,9 +476,9 @@ char *yytext;
|
|
|
#line 2 "gwarf_lex.l"
|
|
|
#include<stdio.h>
|
|
|
#include"y.tab.h"
|
|
|
-#line 473 "lex.yy.c"
|
|
|
+#line 479 "lex.yy.c"
|
|
|
|
|
|
-#line 475 "lex.yy.c"
|
|
|
+#line 481 "lex.yy.c"
|
|
|
|
|
|
#define INITIAL 0
|
|
|
#define COMMENT 1
|
|
@@ -693,7 +699,7 @@ YY_DECL
|
|
|
{
|
|
|
#line 6 "gwarf_lex.l"
|
|
|
|
|
|
-#line 696 "lex.yy.c"
|
|
|
+#line 702 "lex.yy.c"
|
|
|
|
|
|
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
|
|
{
|
|
@@ -720,13 +726,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 >= 46 )
|
|
|
+ if ( yy_current_state >= 51 )
|
|
|
yy_c = yy_meta[yy_c];
|
|
|
}
|
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
|
++yy_cp;
|
|
|
}
|
|
|
- while ( yy_base[yy_current_state] != 58 );
|
|
|
+ while ( yy_base[yy_current_state] != 63 );
|
|
|
|
|
|
yy_find_action:
|
|
|
yy_act = yy_accept[yy_current_state];
|
|
@@ -778,139 +784,159 @@ YY_RULE_SETUP
|
|
|
case 6:
|
|
|
YY_RULE_SETUP
|
|
|
#line 14 "gwarf_lex.l"
|
|
|
-{return MORE;}
|
|
|
+{return MOREEQ;}
|
|
|
YY_BREAK
|
|
|
case 7:
|
|
|
YY_RULE_SETUP
|
|
|
#line 15 "gwarf_lex.l"
|
|
|
-{return LESS;}
|
|
|
+{return LESSEQ;}
|
|
|
YY_BREAK
|
|
|
case 8:
|
|
|
YY_RULE_SETUP
|
|
|
#line 16 "gwarf_lex.l"
|
|
|
-{return EQ;}
|
|
|
+{return NOTEQ;}
|
|
|
YY_BREAK
|
|
|
case 9:
|
|
|
YY_RULE_SETUP
|
|
|
#line 17 "gwarf_lex.l"
|
|
|
-{return ADD;}
|
|
|
+{return MORE;}
|
|
|
YY_BREAK
|
|
|
case 10:
|
|
|
YY_RULE_SETUP
|
|
|
#line 18 "gwarf_lex.l"
|
|
|
-{return SUB;}
|
|
|
+{return LESS;}
|
|
|
YY_BREAK
|
|
|
case 11:
|
|
|
YY_RULE_SETUP
|
|
|
#line 19 "gwarf_lex.l"
|
|
|
-{return MUL;}
|
|
|
+{return EQUAL;}
|
|
|
YY_BREAK
|
|
|
case 12:
|
|
|
YY_RULE_SETUP
|
|
|
#line 20 "gwarf_lex.l"
|
|
|
-{return DIV;}
|
|
|
+{return EQ;}
|
|
|
YY_BREAK
|
|
|
case 13:
|
|
|
YY_RULE_SETUP
|
|
|
#line 21 "gwarf_lex.l"
|
|
|
-{return POW;}
|
|
|
+{return ADD;}
|
|
|
YY_BREAK
|
|
|
case 14:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 23 "gwarf_lex.l"
|
|
|
-{BEGIN COMMENT;}
|
|
|
+#line 22 "gwarf_lex.l"
|
|
|
+{return SUB;}
|
|
|
YY_BREAK
|
|
|
case 15:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 24 "gwarf_lex.l"
|
|
|
-{BEGIN STRING_TEXT;}
|
|
|
+#line 23 "gwarf_lex.l"
|
|
|
+{return MUL;}
|
|
|
YY_BREAK
|
|
|
case 16:
|
|
|
YY_RULE_SETUP
|
|
|
+#line 24 "gwarf_lex.l"
|
|
|
+{return DIV;}
|
|
|
+ YY_BREAK
|
|
|
+case 17:
|
|
|
+YY_RULE_SETUP
|
|
|
#line 25 "gwarf_lex.l"
|
|
|
+{return POW;}
|
|
|
+ YY_BREAK
|
|
|
+case 18:
|
|
|
+YY_RULE_SETUP
|
|
|
+#line 27 "gwarf_lex.l"
|
|
|
+{BEGIN COMMENT;}
|
|
|
+ YY_BREAK
|
|
|
+case 19:
|
|
|
+YY_RULE_SETUP
|
|
|
+#line 28 "gwarf_lex.l"
|
|
|
{BEGIN STRING_TEXT;}
|
|
|
YY_BREAK
|
|
|
-case 17:
|
|
|
+case 20:
|
|
|
+YY_RULE_SETUP
|
|
|
+#line 29 "gwarf_lex.l"
|
|
|
+{BEGIN STRING_TEXT;}
|
|
|
+ YY_BREAK
|
|
|
+case 21:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 26 "gwarf_lex.l"
|
|
|
+#line 30 "gwarf_lex.l"
|
|
|
{
|
|
|
yylval.double_value = atof(yytext);
|
|
|
return NUMBER;
|
|
|
}
|
|
|
YY_BREAK
|
|
|
-case 18:
|
|
|
+case 22:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 30 "gwarf_lex.l"
|
|
|
+#line 34 "gwarf_lex.l"
|
|
|
{
|
|
|
yylval.string_value = yytext;
|
|
|
return VAR;
|
|
|
}
|
|
|
YY_BREAK
|
|
|
-case 19:
|
|
|
+case 23:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 35 "gwarf_lex.l"
|
|
|
+#line 39 "gwarf_lex.l"
|
|
|
;
|
|
|
YY_BREAK
|
|
|
-case 20:
|
|
|
-/* rule 20 can match eol */
|
|
|
+case 24:
|
|
|
+/* rule 24 can match eol */
|
|
|
YY_RULE_SETUP
|
|
|
-#line 36 "gwarf_lex.l"
|
|
|
+#line 40 "gwarf_lex.l"
|
|
|
{return STOP;}
|
|
|
YY_BREAK
|
|
|
-case 21:
|
|
|
+case 25:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 37 "gwarf_lex.l"
|
|
|
+#line 41 "gwarf_lex.l"
|
|
|
{printf("text = [%s];\n", yytext);}
|
|
|
YY_BREAK
|
|
|
-case 22:
|
|
|
-/* rule 22 can match eol */
|
|
|
+case 26:
|
|
|
+/* rule 26 can match eol */
|
|
|
YY_RULE_SETUP
|
|
|
-#line 39 "gwarf_lex.l"
|
|
|
+#line 43 "gwarf_lex.l"
|
|
|
{BEGIN INITIAL;}
|
|
|
YY_BREAK
|
|
|
-case 23:
|
|
|
+case 27:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 40 "gwarf_lex.l"
|
|
|
+#line 44 "gwarf_lex.l"
|
|
|
{BEGIN INITIAL;}
|
|
|
YY_BREAK
|
|
|
-case 24:
|
|
|
+case 28:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 41 "gwarf_lex.l"
|
|
|
+#line 45 "gwarf_lex.l"
|
|
|
;
|
|
|
YY_BREAK
|
|
|
-case 25:
|
|
|
+case 29:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 43 "gwarf_lex.l"
|
|
|
+#line 47 "gwarf_lex.l"
|
|
|
{BEGIN INITIAL;}
|
|
|
YY_BREAK
|
|
|
-case 26:
|
|
|
+case 30:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 44 "gwarf_lex.l"
|
|
|
+#line 48 "gwarf_lex.l"
|
|
|
{BEGIN INITIAL;}
|
|
|
YY_BREAK
|
|
|
-case 27:
|
|
|
-/* rule 27 can match eol */
|
|
|
+case 31:
|
|
|
+/* rule 31 can match eol */
|
|
|
YY_RULE_SETUP
|
|
|
-#line 45 "gwarf_lex.l"
|
|
|
+#line 49 "gwarf_lex.l"
|
|
|
{
|
|
|
yylval.string_value = yytext;
|
|
|
return STRING;
|
|
|
}
|
|
|
YY_BREAK
|
|
|
-case 28:
|
|
|
+case 32:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 49 "gwarf_lex.l"
|
|
|
+#line 53 "gwarf_lex.l"
|
|
|
{
|
|
|
yylval.string_value = yytext;
|
|
|
return STRING;
|
|
|
}
|
|
|
YY_BREAK
|
|
|
-case 29:
|
|
|
+case 33:
|
|
|
YY_RULE_SETUP
|
|
|
-#line 53 "gwarf_lex.l"
|
|
|
+#line 57 "gwarf_lex.l"
|
|
|
ECHO;
|
|
|
YY_BREAK
|
|
|
-#line 913 "lex.yy.c"
|
|
|
+#line 939 "lex.yy.c"
|
|
|
case YY_STATE_EOF(INITIAL):
|
|
|
case YY_STATE_EOF(COMMENT):
|
|
|
case YY_STATE_EOF(STRING_TEXT):
|
|
@@ -1209,7 +1235,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 >= 46 )
|
|
|
+ if ( yy_current_state >= 51 )
|
|
|
yy_c = yy_meta[yy_c];
|
|
|
}
|
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
@@ -1237,11 +1263,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 >= 46 )
|
|
|
+ if ( yy_current_state >= 51 )
|
|
|
yy_c = yy_meta[yy_c];
|
|
|
}
|
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
|
- yy_is_jam = (yy_current_state == 45);
|
|
|
+ yy_is_jam = (yy_current_state == 50);
|
|
|
|
|
|
return yy_is_jam ? 0 : yy_current_state;
|
|
|
}
|
|
@@ -1917,7 +1943,7 @@ void yyfree (void * ptr )
|
|
|
|
|
|
#define YYTABLES_NAME "yytables"
|
|
|
|
|
|
-#line 53 "gwarf_lex.l"
|
|
|
+#line 57 "gwarf_lex.l"
|
|
|
|
|
|
int yywrap(void) {
|
|
|
return 1;
|