[antlr-interest] newbie grammar questions

tblanchard2 todd.blanchard at cacheon.com
Wed Jan 16 12:32:55 PST 2002


I'm starting to get my head around ANTLR and have been playing with 
the grammars provided - mostly the java and html grammars.

I want to do some fairly simple file conversions.  The patterns to 
convert are pretty straight forward, its the stuff that doesn't match 
that I can't figure out how to capture and spit out.  

My case in particular is with JSP pages.  They are a bunch of HTML 
stuff with a few tags that look like <% javaCode %>.

There's a simple case. 

If I make a rule like

scriptlet : "<%" stuff "%>" ;

the whole file might be

file : ( (stuff)? (scriptlet) (stuff)? | (stuff) ) !EOF ;

maybe?

This is a really new way of thinking for me so patience is 
appreciated.  Pointers to helpful resources would be fine.

Thanks,




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list