YACC grammar for Python
Martin v. Loewis
martin at v.loewis.de
Sun May 5 04:32:47 EDT 2002
Don Garrett <garrett at bgb.cc> writes:
> I'm very interested in any results that you get, but it may be that
> YACC can't handle the Python grammer very well. Making indention
> levels significant is different from most of the language types that
> YACC was created for.
That should work just fine if you start from Grammar/Grammer: you just
need a scanner that generates the proper INDENT and DEDENT tokens.
Conversion of Grammar/Grammar to yacc shouldn't be too difficult: you
just have to remove the E part of the EBNF.
HTH,
Martin
More information about the Python-list
mailing list