--- parser3/src/main/compile.C 2001/02/22 12:43:55 1.14 +++ parser3/src/main/compile.C 2001/02/23 22:22:08 1.17 @@ -1,5 +1,5 @@ /* - $Id: compile.C,v 1.14 2001/02/22 12:43:55 paf Exp $ + $Id: compile.C,v 1.17 2001/02/23 22:22:08 paf Exp $ */ #include "pa_request.h" @@ -38,14 +38,14 @@ Array& Request::real_compile(COMPILE_PAR // parse=compile! yydebug=1; if(yyparse(&pc)) { // error? - if(pc.col==0) { - // 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=-2; - } + pc.col=-1; + } THROW(0,0, 0, - "%s [%s:%d:%d]", pc.error, file, 1+pc.line, 1+pc.col); + "%s(%d:%d): %s", file, 1+pc.line, pc.col, pc.error); } // result