1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
535 B

import os
import antlr3
import testbase
import unittest
class t019lexer(testbase.ANTLRTest):
def setUp(self):
self.compileGrammar()
def testValid(self):
inputPath = os.path.splitext(__file__)[0] + '.input'
with open(inputPath) as f:
stream = antlr3.StringStream(f.read())
lexer = self.getLexer(stream)
while True:
token = lexer.nextToken()
if token.type == antlr3.EOF:
break
if __name__ == '__main__':
unittest.main()