[antlr-interest] Generating XML from a antlr grammer!
Johannes Luber
jaluber at gmx.de
Mon Jun 11 05:36:56 PDT 2007
chitti vamshi wrote:
> Hello,
>
> <?xml version='1.0' encoding='utf-8'?> <slideshow title="Sample Slide Show" date="Date of publication" author="Yours Truly"> <slide type="all"> <title>Wake up to WonderWidgets!</title>
> </slide>
> </slideshow> I am new to writing a Grammar File.
>
> How to generate a sample Grammar file based upon the above xml file.
Look at
<http://www.antlr.org/wiki/display/ANTLR3/Quick+Starter+on+Parser+Grammars+-+No+Past+Experience+Required>
for grammar files in general and
<http://www.antlr.org/wiki/display/ANTLR3/1.+Lexer>, how recognize XML
tags. BTW, the grammar in the latter link doesn't check the correct
order of tags (matching closing tag to opening tag).
Best regards,
Johannes Luber
More information about the antlr-interest
mailing list