> @ Istvan is it possible that u send me the *.l & *.y files for python > Or post a link. Always when i search for python and .y or bison i just > find links to PyBison or PLY but no bison and lex file for Python.
The python grammar is in the python source tree in directory Grammar, file Grammar. The python indenting is in the grammar in line 80: suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT This is not a yacc or bison grammar because python has its own internal parser generator pgen in the directory Parser. The routine tok_get() in tokenizer.c generates the INDENT and DEDENT tokens for the parser. The parser generator source is in pgenmain.c Output of this parser generator is graminit.c .h: http://svn.python.org/view/python/trunk/Python/graminit.c?view=markup http://svn.python.org/view/python/trunk/Include/graminit.h?view=markup Here are the links to the python grammar and pgen: http://svn.python.org/view/python/trunk/Grammar/ http://svn.python.org/view/python/trunk/Parser/ The python source as tar.gz is here: http://www.python.org/download/ _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison