XML based programming language

stefaan stefaan.himpe at gmail.com
Mon Mar 19 08:35:48 EDT 2007


> Elementtree isn't lex. You are comparing apples and oranges here. Lex
> tokenizes, yacc creates trees. Both of is covered in XML itself - it's
> defined the tokenization and parsing, built into elementtree. So,
> elemnttree is lex _and_ yacc for XML. And if your language is written in
> XML, that's all there is to it.

I see your point. But yacc does more: I specify a grammar, and yacc
will
reject input files that do not conform to the grammar.
Elementtree OTOH will happily accept any valid XML file, all checking
has to
implememented manually by me.

Best regards,
Stefaan.




More information about the Python-list mailing list