--- parser3/src/main/compile.C 2001/02/22 10:43:45 1.13 +++ parser3/src/main/compile.C 2001/02/22 14:45:27 1.16 @@ -1,5 +1,5 @@ /* - $Id: compile.C,v 1.13 2001/02/22 10:43:45 paf Exp $ + $Id: compile.C,v 1.16 2001/02/22 14:45:27 paf Exp $ */ #include "pa_request.h" @@ -36,13 +36,13 @@ Array& Request::real_compile(COMPILE_PAR pc.sp=0; // parse=compile! - ///yydebug=1; + yydebug=1; if(yyparse(&pc)) { // error? - if(pc.col==1) { - // step back from last char. -1 col means EOL + if(pc.col==0) { // expecting something after EOL means they've expected it BEFORE + // step back. -1 col means EOL pc.line--; pc.col=-1; - } + } THROW(0,0, 0, "%s [%s:%d:%d]", pc.error, file, 1+pc.line, pc.col);