# HG changeset patch # User mario # Date 1194100462 -3600 # Node ID d79c950fb9c35e225e2954cda0443b6034f3ef7c # Parent 7417b346e5a3b8b8bfab91f1a398d819849d5116 fixing bug in handling of PRIVATE token. diff -r 7417b346e5a3 -r d79c950fb9c3 stage1_2/iec.flex --- a/stage1_2/iec.flex Sat Nov 03 15:33:53 2007 +0100 +++ b/stage1_2/iec.flex Sat Nov 03 15:34:22 2007 +0100 @@ -974,7 +974,7 @@ * handling this function and keyword clash in bison! */ {identifier} {int token = get_identifier_token(yytext); - // printf("flex: analysing identifier '%s'...", yytext); + fprintf(stderr, "flex: analysing identifier '%s'...", yytext); if ((token == prev_declared_variable_name_token) || // (token == prev_declared_derived_function_name_token) || // DO NOT add this condition! (token == prev_declared_fb_name_token)) { @@ -987,11 +987,11 @@ * library_symbol_table as a default function name! */ yylval.ID=strdup(yytext); - // printf("returning token %d\n", token); + fprintf(stderr, "returning token %d\n", token); return token; } /* otherwise, leave it for the other lexical parser rules... */ - // printf("rejecting\n"); + fprintf(stderr, "rejecting\n"); REJECT; } @@ -1182,7 +1182,9 @@ * it is explicitly required and we are not expecting any identifiers * that could also use the same letter sequence (i.e. an identifier: piority) */ + /* PRIORITY return PRIORITY; + */ { L return L; @@ -1357,7 +1359,7 @@ DO return DO; END_FOR return END_FOR; -WHILE return WHILE; +WHILE {fprintf(stderr, "flex: returning token WHILE\n"); return WHILE;} DO return DO; END_WHILE return END_WHILE;