testing int with yyleng
This commit is contained in:
2
lex.yy.c
2
lex.yy.c
@ -824,7 +824,7 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 27 "lexicalStructure.lex"
|
||||
{if(DEBUG) {printf( "T_INTEGER: %s (%d)\n", yytext, T_INTEGER);} else {return T_INTEGER;}}
|
||||
{if(DEBUG) {printf( "T_INTEGER: %s (%d)\n", yytext, T_INTEGER);} else {column_number=column_number+yyleng; return T_INTEGER;}}
|
||||
YY_BREAK
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
|
@ -23,7 +23,7 @@ SCHAR \\n|\\t|\\\"|[^\"\n\\]
|
||||
|
||||
%%
|
||||
|
||||
"integer" {if(DEBUG) {printf( "T_INTEGER: %s (%d)\n", yytext, T_INTEGER);} else {return T_INTEGER;}}
|
||||
"integer" {if(DEBUG) {printf( "T_INTEGER: %s (%d)\n", yytext, T_INTEGER);} else {column_number=column_number+yyleng; return T_INTEGER;}}
|
||||
"address" {if(DEBUG) {printf( "T_ADDRESS: %s (%d)\n", yytext, T_ADDRESS);} else {return T_ADDRESS;}}
|
||||
"Boolean" {if(DEBUG) {printf( "T_BOOLEAN: %s (%d)\n", yytext, T_BOOLEAN);} else {return T_BOOLEAN;}}
|
||||
"character" {if(DEBUG) {printf( "T_CHARACTER: %s (%d)\n", yytext, T_CHARACTER);} else {return T_CHARACTER;}}
|
||||
|
@ -1,3 +1,8 @@
|
||||
1 1 301 "45"
|
||||
2 1 301 "123"
|
||||
3 1 301 "8392"
|
||||
4 1 301 "40"
|
||||
4 2 301 "40"
|
||||
5 2 301 "200"
|
||||
5 3 301 "50"
|
||||
5 4 301 "21783"
|
||||
|
@ -1,4 +1,5 @@
|
||||
45
|
||||
123
|
||||
8392
|
||||
|
||||
40 40
|
||||
200 50 21783
|
||||
|
Reference in New Issue
Block a user