diff --git a/flex.o b/flex.o index c0c6827..ca2157c 100644 Binary files a/flex.o and b/flex.o differ diff --git a/lex.yy.c b/lex.yy.c index 09a71bf..683e3bd 100644 --- a/lex.yy.c +++ b/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 diff --git a/lexicalStructure.lex b/lexicalStructure.lex index 86799c2..ef6b184 100644 --- a/lexicalStructure.lex +++ b/lexicalStructure.lex @@ -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;}} diff --git a/runner b/runner index 1af2d69..967e827 100755 Binary files a/runner and b/runner differ diff --git a/test_simpleIntTest.tok b/test_simpleIntTest.tok index 2bdbdd3..e7925f5 100644 --- a/test_simpleIntTest.tok +++ b/test_simpleIntTest.tok @@ -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" diff --git a/tests/test_simpleIntTest.alpha b/tests/test_simpleIntTest.alpha index 507ec22..127f0a6 100644 --- a/tests/test_simpleIntTest.alpha +++ b/tests/test_simpleIntTest.alpha @@ -1,4 +1,5 @@ 45 123 8392 - +40 40 + 200 50 21783