--- parser3/src/main/compile.tab.C 2001/09/24 14:34:25 1.13 +++ parser3/src/main/compile.tab.C 2001/10/08 08:21:04 1.18 @@ -29,9 +29,16 @@ #define IS 279 #define NEG 280 -#line 8 "compile.y" +#line 1 "compile.y" -static char *RCSId="$Id: compile.tab.C,v 1.13 2001/09/24 14:34:25 parser Exp $"; +/** @file + Parser: compiler(lexical parser and grammar). + + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://design.ru/paf) + + $Id: compile.tab.C,v 1.18 2001/10/08 08:21:04 parser Exp $ +*/ /** @todo parser4: @@ -457,7 +464,7 @@ static const short yycheck[] = { 0, #define YYPURE 1 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "D:/cygwin/usr/share/bison.simple" +#line 3 "/usr/share/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -671,7 +678,7 @@ __yy_memcpy (char *to, char *from, unsig #endif #endif -#line 217 "D:/cygwin/usr/share/bison.simple" +#line 217 "/usr/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -1588,7 +1595,7 @@ case 157: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "D:/cygwin/usr/share/bison.simple" +#line 543 "/usr/share/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -1855,7 +1862,19 @@ static int yylex(YYSTYPE *lvalp, void *p } else PC.col++; - if(c=='^' && PC.ls!=LS_COMMENT && PC.ls!=LS_DEF_COMMENT) + if(c=='^') + switch(PC.ls) { +case LS_EXPRESSION_VAR_NAME_WITH_COLON: +case LS_EXPRESSION_VAR_NAME_WITHOUT_COLON: +case LS_VAR_NAME_SIMPLE_WITH_COLON: +case LS_VAR_NAME_SIMPLE_WITHOUT_COLON: +case LS_VAR_NAME_CURLY: +case LS_METHOD_NAME: +case LS_COMMENT: +case LS_DEF_COMMENT: + // no literals in names, please + break; +default: switch(*PC.source) { // ^escaping some punctuators case '^': case '$': case ';': @@ -1910,6 +1929,8 @@ static int yylex(YYSTYPE *lvalp, void *p } break; } + break; + } // #comment start skipping if(c=='#' && PC.col==1) { if(end!=begin) {