--- parser3/src/main/compile.y 2001/02/21 06:59:43 1.4 +++ parser3/src/main/compile.y 2001/02/21 07:34:03 1.7 @@ -11,7 +11,6 @@ #include #include -#include "pa_exception.h" #include "compile_tools.h" int real_yyerror (parse_control *pc, char *s); @@ -102,8 +101,7 @@ complex_constructor_param_body: | codes__str__followed_by__excluding_sole_str_literal ; constructor_two_params_value: STRING ';' constructor_one_param_value { - const String *operator_or_fmtS=LA2S($1); - char *operator_or_fmt=operator_or_fmtS->cstr(); + char *operator_or_fmt=LA2S($1)->cstr(); $$=N(PC->pool); P($$, $1);/* stack: ncontext name operator_or_fmt */ P($$, $3); /* stack: ncontext name operator_or_fmt expr */ @@ -115,9 +113,8 @@ constructor_two_params_value: STRING ';' OP($$, OP_MODIFY_EVAL); break; default: - PC->pool->exception().raise(0,0, - operator_or_fmtS, - "invalid modification operator"); + strcpy(PC->error, "invalid modification operator"); + YYERROR; } /* stack: ncontext name value */ }; @@ -502,7 +499,7 @@ int yylex(YYSTYPE *lvalp, void *pc) { } break2: - if(PC->source-1==start) + if(PC->source-1<=start) return result; else { PC->pending_state=result; @@ -520,11 +517,8 @@ break2: int real_yyerror (parse_control *pc, char *s) /* Called by yyparse on error */ { fprintf (stderr, "[%s]\n", s); - - pc->exception->raise(0,0, - 0, - "%s after %s[%d:%d]", s, pc->file, pc->line, pc->col-1); - // never returns + + s[MAX_STRING-1]=0; strcpy(pc->error, s); return 1; }