1import os
2import antlr3
3import testbase
4import unittest
5
6class t019lexer(testbase.ANTLRTest):
7    def setUp(self):
8        self.compileGrammar()
9
10
11    def testValid(self):
12        inputPath = os.path.splitext(__file__)[0] + '.input'
13        stream = antlr3.StringStream(open(inputPath).read())
14        lexer = self.getLexer(stream)
15
16        while True:
17            token = lexer.nextToken()
18            if token.type == antlr3.EOF:
19                break
20
21if __name__ == '__main__':
22    unittest.main()
23