testing int with yyleng

This commit is contained in:
Partho Bhattacharya
2025-02-13 19:28:38 -05:00
parent 90407da44c
commit 3c6d3be9b4
6 changed files with 9 additions and 3 deletions

View File

@ -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;}}