[antlr-interest] Re: antlr as rtf parser?

lgcraymer lgc at mail1.jpl.nasa.gov
Tue Jan 27 11:27:22 PST 2004


I wrote one a few years back in PCCTS (actually a subset parser for extracting information from a specification document).  Microsoft 
keeps an up-to-date spec including grammar--look up "RTF" with their search engine.  You'll want a lexer rule to identify keywords 
(anything that looks like   '/' (A..Z | a..z)+ (0-9)* ), keep them in a symbol table with the numbers of arguments for each symbol (I had 
a separate specification grammar to distinguish between keywords with one or two arguments), and use semantic predicates to deal 
with keyword-dependent alternatives.

So, yes it can be done with ANTLR.  I relied heavily on semantic predicate hoisting, so there may be a bit more pain with ANTLR 2.

--Loring


--- In antlr-interest at yahoogroups.com, "Eddie Nolan" <edmond_nolan at y...> wrote:
> Hi,
> 
> I want to write an RTF parser, can I use antlr for this? Can anyone
> give me some pointers?
> 
> Regards,
> 
> Eddie


 

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