[antlr-interest] AST of PL/SQL and XML

Albertas Laurinavičius alberlau at gmail.com
Fri Nov 4 05:36:37 PST 2005


Martin,
yes i know http://www.antlr.org/grammar/list grammar list, and i don't want
to write my own xml parser. My task is to write tool that parses some source
code(Java,C#,Pl/SQL) into AST tree in unified way. As far as i know ANTLR
for that purpose uses somelanguage.tree.g file, that defines AST, i found
that file for java, but cannot find it for other languages. Maybe you can
make me point, how could i build AST tree without tree.g (AST Recognizer
Grammar).

On 11/4/05, Martin Probst <mail at martin-probst.com> wrote:
>
> Hi,
>
> > Is there any chnace to build AST for PL/SQL and XML? As far as i know
> > i need to have somegrammar.tree.g file, but i found that file for java
> > grammar only.
>
> The freely available grammars are not all distributed with ANTLR. You
> can find them here:
> > http://www.antlr.org/grammar/list
> and there is also one for PL/SQL.
>
> For XML it's usually completely sufficient to use a normal XML parser,
> like the one that comes with the Java SDK, or any choice of the freely
> available ones. An XML parser usually creates a DOM Tree or a list of
> SAX events which you can then handle in your application.
>
> > Should i write that file myself, or i'm missing some points.
>
> Writing an XML parser is a very bad idea. There are high quality parsers
> available and XML parsing can be surprisingly tricky sometimes...
>
> Martin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20051104/fa174009/attachment.html


More information about the antlr-interest mailing list