Home | History | Annotate | Download | only in tests
      1 import antlr3
      2 import testbase
      3 import unittest
      4 
      5 class t016actions(testbase.ANTLRTest):
      6     def setUp(self):
      7         self.compileGrammar()
      8         
      9         
     10     def testValid(self):
     11         cStream = antlr3.StringStream("int foo;")
     12         lexer = self.getLexer(cStream)
     13         tStream = antlr3.CommonTokenStream(lexer)
     14         parser = self.getParser(tStream)
     15         name = parser.declaration()
     16         assert name == 'foo', name
     17             
     18 
     19 if __name__ == '__main__':
     20     unittest.main()
     21