Flython
Christopher T King
squirrel at WPI.EDU
Mon Aug 16 10:46:57 EDT 2004
On Mon, 16 Aug 2004, Michael Hudson wrote:
> Christopher T King <squirrel at WPI.EDU> writes:
>
> > (Unfortunately, AST trees don't match up exactly with Python grammar, so
> > I'm having to learn the format by trial-and-error. Not much fun. Is
> > there documentation on the AST forms anywhere?)
>
> Which AST are you talking about?
Whatever is spit out by parser.suite(). Things like grammar.txt's
"statement" being represented symbol.stmt, and grammar.txt's stmt_list not
existing at all in the AST trees (though most/all of the other _lists
exist).
> Which version of Python, etc?
2.3. I'm using http://docs.python.org/ref/grammar.txt as my grammar
reference.
> However, the answer to the "documentation" plea is probably "no".
:( Is there at least some rationale why the AST trees don't match the
grammar definitions?
More information about the Python-list
mailing list