[pypy-svn] r10636 - pypy/dist/pypy/module/parser

tismer at codespeak.net tismer at codespeak.net
Thu Apr 14 19:26:50 CEST 2005


Author: tismer
Date: Thu Apr 14 19:26:50 2005
New Revision: 10636

Modified:
   pypy/dist/pypy/module/parser/pyparser.py
Log:
give childadefault, for the case that children was empty.
Makes flow space happier, but pyparser is still not RPythonic.
Leaving this alone for now.

Modified: pypy/dist/pypy/module/parser/pyparser.py
==============================================================================
--- pypy/dist/pypy/module/parser/pyparser.py	(original)
+++ pypy/dist/pypy/module/parser/pyparser.py	Thu Apr 14 19:26:50 2005
@@ -140,6 +140,7 @@
     classify = lambda sym, name : DFAParser.classify(pygrammar, sym, name)
     symbol_no, symbol_name, initial, states, first = dfa
     crnt_state = states[initial]
+    child = ['<no children>'] # have a defined state, also for flow
     for child in children:
         ((child_symbol, child_text, child_line_no), grandchildren) = child
         ilabel = classify(child_symbol, child_text)



More information about the Pypy-commit mailing list