oship-dev team mailing list archive
-
oship-dev team
-
Mailing list archive
-
Message #00343
Parsing tools [Re: Automatic Python code generation]
Hi, again:
Some new findings and a question.
Concerning code-generation, I've concluded that it's mainly on UML tools
that we'll be able to find code-generating capabilities. Even DIA
(http://live.gnome.org/Dia), in principle a diagram-drawing -only
program, has a plugin that generates code directly, from drawings of UML
class diagrams (http://dia2code.sourceforge.net/examples.html).
OTOH, if we choose to go the EBNF way, there is RP
(http://lparis45.free.fr/rp.html), which can accept (a subset of) EBNF
directly.
So that brings me to my question: in what ADL description (Eiffel, UML,
EBNF etc) is the pyparsing code (adl_1_4.py) exactly based on? Is it
worth to change this (authoritative) reference, for the next versions?
Cheers,
Roberto.
> Hi, Tim:
> The following link is the more comprehensive that I found so far,
> about "Python parsing":
> http://nedbatchelder.com/text/python-parsers.html . In fact, there are
so many alternatives that's somewhat difficult to pick one... Berkeley
YACC, ANTLR etc are good, but not exactly what we want: they generate
Python code, but only _parsing_ code.
>
> My suggestion? As we already have some work done in pyparsing, there
> is e.g.: yeanpypa -- YEt ANother PYthon PArser
> (http://www.slash-me.net/dev/snippets/yeanpypa/documentation.html),
inspired by pyparsing (and spirit), which follows the EBNF
> (http://en.wikipedia.org/wiki/Ebnf) standard. It's even simpler to work
with than pyparsing. But doesn't generate Python code at all...
> Roberto.
>
> Tim Cook a écrit :
>> [...] We will certainly need a new parser even for ADL. I like pyparsing
>> because it is simple to use; in relative terms. However, I would
rather see someone exploring using the ADL grammar in a more
>> conventional lexx/yacc approach. Volunteers? [...]
>
> _______________________________________________
> Mailing list: https://launchpad.net/~oship-dev
> Post to : oship-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~oship-dev
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References