--- parser3/src/main/compile.tab.C 2003/04/03 11:19:49 1.81.2.13.2.24 +++ parser3/src/main/compile.tab.C 2003/04/03 13:44:33 1.81.2.13.2.28 @@ -43,7 +43,7 @@ Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.tab.C,v 1.81.2.13.2.24 2003/04/03 11:19:49 paf Exp $ + $Id: compile.tab.C,v 1.81.2.13.2.28 2003/04/03 13:44:33 paf Exp $ */ /** @@ -83,9 +83,9 @@ // forwards -static int real_yyerror(Parse_control *pc, char *s); -static void yyprint(FILE *file, int type, YYSTYPE value); -static int yylex(YYSTYPE *lvalp, void *pc); +static int real_yyerror(Parse_control* pc, char* s); +static void yyprint(FILE* file, int type, YYSTYPE value); +static int yylex(YYSTYPE* lvalp, void* pc); // local convinient inplace typecast & var @@ -1917,7 +1917,7 @@ yyerrhandle: 4:[^({]=pop */ -inline ungetc(Parse_control& pc, uint last_line_end_col) { +inline void ungetc(Parse_control& pc, uint last_line_end_col) { pc.source--; if(pc.pos.col==0) { --pc.pos.line; pc.pos.col=last_line_end_col; @@ -1942,7 +1942,6 @@ static int yylex(YYSTYPE *lvalp, void *a const char *begin=pc.source; Pos begin_pos=pc.pos; - uint last_line_end_col=0; const char *end; int skip_analized=0; while(true) { @@ -1950,9 +1949,7 @@ static int yylex(YYSTYPE *lvalp, void *a // fprintf(stderr, "\nchar: %c %02X; nestage: %d, sp=%d", c, c, lexical_brackets_nestage, pc.sp); if(c=='\n') { - pc.pos.line++; - last_line_end_col=pc.pos.col; - pc.pos.col=0; + pc.pos_next_line(); } else pc.pos.col+=c=='\t'?TAB_SIZE:1; @@ -2377,7 +2374,7 @@ default: // expression integer division case '\\': pop_LS(pc); - ungetc(pc, last_line_end_col); + pc.ungetc(); result=EON; goto break2; } @@ -2389,7 +2386,7 @@ default: switch(c) { case ':': pop_LS(pc); - ungetc(pc, last_line_end_col); + pc.ungetc(); result=EON; goto break2; } @@ -2409,7 +2406,7 @@ default: // before call case '^': pop_LS(pc); - ungetc(pc, last_line_end_col); + pc.ungetc(); result=EON; goto break2; case '[': @@ -2606,7 +2603,7 @@ default: RC; } pop_LS(pc); - ungetc(pc, last_line_end_col); + pc.ungetc(); result=EON; goto break2; }