[antlr-interest] How to parser {******} and {!{***********}!}?

jiapu2003 jiapu2003 at yahoo.com
Thu Dec 18 19:20:25 PST 2003


I am trying to write a SRGS ABNF parser. There are two tag formats, 
which I think stupid.

{ ******* }
{!{ ********* }!}

Within the tags can be anything. 

The first format is easy, I used:
TAG	:	'{'! 
		(
		options{ 
			generateAmbigWarnings=false;
			}
		:	"\r\n" {newline();}
		|	'\r'	{newline();}
		|	'\n'	{newline();}
		|	~('}'|'\n'|'\r')
		)*
		'}'!
                ;

But I have no idea how to deal with the other format.



 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/antlr-interest/

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

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




More information about the antlr-interest mailing list