1 import antlr3 2 import testbase 3 import unittest 4 5 6 class t031emptyAlt(testbase.ANTLRTest): 7 def setUp(self): 8 self.compileGrammar() 9 10 11 def testValid1(self): 12 cStream = antlr3.StringStream('foo') 13 lexer = self.getLexer(cStream) 14 tStream = antlr3.CommonTokenStream(lexer) 15 parser = self.getParser(tStream) 16 events = parser.r() 17 18 19 if __name__ == '__main__': 20 unittest.main() 21 22