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.
26 lines
569 B
26 lines
569 B
import antlr3
|
|
import testbase
|
|
import unittest
|
|
|
|
|
|
class t027eof(testbase.ANTLRTest):
|
|
def setUp(self):
|
|
self.compileGrammar()
|
|
|
|
|
|
@testbase.broken("That's not how EOF is supposed to be used", Exception)
|
|
def testValid1(self):
|
|
cStream = antlr3.StringStream(' ')
|
|
lexer = self.getLexer(cStream)
|
|
|
|
tok = lexer.nextToken()
|
|
assert tok.type == self.lexerModule.SPACE, tok
|
|
|
|
tok = lexer.nextToken()
|
|
assert tok.type == self.lexerModule.END, tok
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|
|
|