XML based programming language
stefaan.himpe at gmail.com
Mon Mar 19 13:35:48 CET 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
reject input files that do not conform to the grammar.
Elementtree OTOH will happily accept any valid XML file, all checking
implememented manually by me.
More information about the Python-list