Print possibilities after each read() call.

parent 6c6d35a6
pybison @ 282beeb2
Subproject commit e1dc885322fba639d6447c76e0ecf65896502b97
Subproject commit 282beeb275a9dde703523670a77c4449ce1decf8
#!/usr/bin/python
from src.parser import main
if __name__ == '__main__':
main()
......@@ -144,6 +144,13 @@ class Parser(BisonParser):
data = data_after
if self.interactive:
if not self.possibilities:
print 'possibilities: None'
else:
print 'possibilities:'
print self.possibilities
return data
def hook_handler(self, target, option, names, values, retval):
......@@ -155,6 +162,9 @@ class Parser(BisonParser):
return retval
def hook_run(self, filename, retval):
return retval
# ---------------------------------------------------------------
# These methods are the python handlers for the bison targets.
# (which get called by the bison code each time the corresponding
......@@ -390,8 +400,5 @@ def main():
if interactive:
print
return node
if __name__ == '__main__':
main()
return node
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment