1import antlr3
2import testbase
3import unittest
4
5class 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
19if __name__ == '__main__':
20    unittest.main()
21