[antlr-interest] antlr suitable for xml languages? (like bpel and are there existing grammaires)

mp.lists at free.fr mp.lists at free.fr
Mon Dec 19 02:30:39 PST 2005


Hello, Dominik,

SOA Work writes:
|
| Hi,
|
| im new to antlr (to parsing at all for being honest).
|
| I am planning to create a parser for the bpel language. Now my questions (as mentioned in the subject):
|
| 1. can i parse xml languages like bpel, wsdl, xhtml or soap messages with antlr? or is it more simple just to use some xml parsers?
|
If you are interested in strict checking for schema conformity, it is
probably much easier to use one of the xml parser generators like
xmlbeans, castor or jaxb.  With xmlbeans, you have a running bpel-parser
in 1 hour -- download included.

Sole reason, I can presently imagine to justify a decision for a generic
parser generator, is, if you have a framework, which should only include
one parser generator and you intend to parse many different languages.
Otherwise, the xml-parser generators mentioned above are probably hard
to beat by a generic parser generator when it comes to parse xml.


| 2. if using antlr for parsing bpel, does somebody know existing grammair files for this language?
|
You can start with an xml grammar and, if needed, extend it later for
particular bpel|wsdl syntax features.
A group of the University of Munich evolved the xml grammar of the
xml spec.  You can take that as starting point.  But you will have to
do further work to decide, which rules should go into the tokenizer
and which should be part of the L2-grammar.

If you really want to do it, you can ask me for an even evolved grammar
as a starting point.



Hope, this helps yet,

~   Markus




More information about the antlr-interest mailing list