Rev 162 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/usr/bin/env python# Copyright: Ira W. Snyder# Start Date: 2005-11-18# End Date:# License: Public Domain## Changelog Follows:## 2005-11-18# * Just getting the basics in place, since we haven't been given# the whole description of the project yet.## Check for <Python-2.3 compatibility (boolean values)try:True, Falseexcept NameError:(True, False) = (1, 0)class RecursiveDescentParser():def __init__(self):passdef __clear(self):self.str = "" # the string of input to testself.strpos = 0 # the current position in strdef __input_test_str(self):passdef main_menu(self):done = Falsewhile not done:print 'Menu:'print '========================================'print '1. Test a string'print '2. Quit's = raw_input('Choice >>> ')if s == '1':self.__input_test_str()self.__test_str()elif s == '2':done = Trueelse:print 'Bad Selection'if __name__ == '__main__':print 'Not complete yet, don\'t bother'