[antlr-interest] Re: antlr outputting Python code: status?

lgcraymer lgc at mail1.jpl.nasa.gov
Sun Jan 18 18:07:31 PST 2004


Michael--

An alternative approach to case statements would be to build a
dictionaries with lambda entries as data--then do lookup and execute.
 That should map fairly easily onto the ANTLR code generation framework.

--Loring


--- In antlr-interest at yahoogroups.com, Michael Cahill <mjc at s...> wrote:
> Hi Ed,
> 
> On Jan 18, 2004, at 5:00 AM, edcjones wrote:
> > Periodically someone writes to comp.lang.python asking for a C parser
> > written in Python. There is an antlr project by Amol Dharmadhikari to
> > modify antlr so it can output parsers written in Python. How is this
> > project doing? Is there any documentation for it? Any URLs?
> 
> I've made some progress with the Amol's code that was uploaded to 
> antlr.org.  It's at the point where it generates correct code for 
> calc.g but not java.g.  I've also converted the ANTLR runtime classes 
> into Python so the generated code runs with standard Python (i.e., 
> doesn't require Jython).  One of the main remaining issues is getting 
> non-trivial "case" statements converted to Python, which only provides 
> "if-elif-else".
> 
> I'd be happy to upload what I've got to antlr.org or create a 
> Sourceforge project so that other folks can get involved -- I haven''t 
> had much time to spend on it lately.  Let me know what you think would 
> work best for this kind of project.
> 
> Michael.


 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/antlr-interest/

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list