aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/Python/tests/t034tokenLabelPropertyRef.py
diff options
context:
space:
mode:
Diffstat (limited to 'antlr-3.4/runtime/Python/tests/t034tokenLabelPropertyRef.py')
-rw-r--r--antlr-3.4/runtime/Python/tests/t034tokenLabelPropertyRef.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/antlr-3.4/runtime/Python/tests/t034tokenLabelPropertyRef.py b/antlr-3.4/runtime/Python/tests/t034tokenLabelPropertyRef.py
new file mode 100644
index 0000000..b94de13
--- /dev/null
+++ b/antlr-3.4/runtime/Python/tests/t034tokenLabelPropertyRef.py
@@ -0,0 +1,40 @@
+import antlr3
+import testbase
+import unittest
+
+
+class t034tokenLabelPropertyRef(testbase.ANTLRTest):
+ def setUp(self):
+ self.compileGrammar()
+
+
+ def lexerClass(self, base):
+ class TLexer(base):
+ def recover(self, input, re):
+ # no error recovery yet, just crash!
+ raise
+
+ return TLexer
+
+
+ def parserClass(self, base):
+ class TParser(base):
+ def recover(self, input, re):
+ # no error recovery yet, just crash!
+ raise
+
+ return TParser
+
+
+ def testValid1(self):
+ cStream = antlr3.StringStream(' a')
+
+ lexer = self.getLexer(cStream)
+ tStream = antlr3.CommonTokenStream(lexer)
+ parser = self.getParser(tStream)
+ events = parser.a()
+
+
+if __name__ == '__main__':
+ unittest.main()
+