[antlr-interest] parsing python
Terence Parr
parrt at cs.usfca.edu
Fri Feb 27 17:03:06 PST 2004
Well, I've embarked on my parser for python. First task was to
autoconvert the distribution grammar to ANTLR format. Then I jumped on
the lexical issues. Eewwwwwwwwwww! Should never watch sausage being
made or python being lexically analyzed. I think Humans can get pretty
used to this weird indentation thing as it's nice visually. Getting
the lexer to handle the weird structure and the fun exceptions to the
rules, is no picnic.
Anyway, I have something that looks like a parser with a
PythonTokenStream that does the right INDENT/DEDENT imaginary token
generation, but I have to add in a few random "allow trailing commas
for no reason" (COMMA)? subrules. Then I will attempt a symbol table
manager so I can learn the semantics of symbol table lookup.
I'll post something when it's ready for public consumption. :)
Nice language, python....just a little kinky lexically. ;)
Ter
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!
Cofounder, http://www.peerscope.com pure link sharing
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