Update of /cvsroot/webmacro/webmacro/src/org/webmacro/parser
In directory sc8-pr-cvs1:/tmp/cvs-serv29146/src/org/webmacro/parser
Modified Files:
WMParser_impl.java WMParser_impl.jj
Log Message:
- change "...Expecting #end" error message to (per Keats):
Unclosed block beginning at line XX. Check for invalid directive options or missing a #end
- add a <javacc> target to ant, so you can re-gen the parser with this:
ant javacc
You could previously have done it with "ant precompile", but I could never remember that. :)
Index: WMParser_impl.java
===================================================================
RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/parser/WMParser_impl.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** WMParser_impl.java 21 May 2003 23:04:55 -0000 1.49
--- WMParser_impl.java 12 Jun 2003 00:17:49 -0000 1.50
***************
*** 2199,2203 ****
case 0:
jj_consume_token(0);
! {if (true) throw new ParseException("Encountered EOF, expecting #end at " + token.beginLine + "." + token.beginColumn);}
break;
case RBRACE:
--- 2199,2203 ----
case 0:
jj_consume_token(0);
! {if (true) throw new ParseException("Unclosed block beginning at line " + token.beginLine + ". Check for invalid directive options or missing a #end");}
break;
case RBRACE:
Index: WMParser_impl.jj
===================================================================
RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/parser/WMParser_impl.jj,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** WMParser_impl.jj 21 May 2003 23:04:55 -0000 1.47
--- WMParser_impl.jj 12 Jun 2003 00:17:49 -0000 1.48
***************
*** 1175,1179 ****
| ( [ <BEGIN> EatWsNlOrSpace(block) ]
( WMContentNoDirective(block)
! | (<EOF>) { throw new ParseException("Encountered EOF, expecting #end at " + token.beginLine + "." + token.beginColumn); }
| (t=<LBRACE> | t=<RBRACE>) { block.addElement(t.image); }
| LOOKAHEAD(<POUND>, { lookahead_not_breaking_subd() })
--- 1175,1179 ----
| ( [ <BEGIN> EatWsNlOrSpace(block) ]
( WMContentNoDirective(block)
! | (<EOF>) { throw new ParseException("Unclosed block beginning at line " + token.beginLine + ". Check for invalid directive options or missing a #end"); }
| (t=<LBRACE> | t=<RBRACE>) { block.addElement(t.image); }
| LOOKAHEAD(<POUND>, { lookahead_not_breaking_subd() })
|