Add full source for antlr project (version 3.4) This replaces the existing source for an unknown version of the antlr-runtime with the full source for the antlr tool. However, we are still building just the runtime jar, not the full tool. The full tool will be included as a prebuilt jar, due to the complexities of building this tool. Since we will have both the full tool and the runtime jar in the Android tree, the module name for the runtime jar has been changed from "antlr" to "antlr-runtime" Change-Id: I38d5f3e5e82392dc122f46bf7961aab5b42e40c5 Signed-off-by: Ben Gruver <[email protected]>
diff --git a/antlr-3.4/runtime/Python/tests/t032subrulePredict.py b/antlr-3.4/runtime/Python/tests/t032subrulePredict.py new file mode 100644 index 0000000..7b62add --- /dev/null +++ b/antlr-3.4/runtime/Python/tests/t032subrulePredict.py
@@ -0,0 +1,44 @@ +import antlr3 +import testbase +import unittest + + +class t032subrulePredict(testbase.ANTLRTest): + def setUp(self): + self.compileGrammar() + + + 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( + 'BEGIN A END' + ) + + lexer = self.getLexer(cStream) + tStream = antlr3.CommonTokenStream(lexer) + parser = self.getParser(tStream) + events = parser.a() + + + @testbase.broken("DFA tries to look beyond end of rule b", Exception) + def testValid2(self): + cStream = antlr3.StringStream( + ' A' + ) + + lexer = self.getLexer(cStream) + tStream = antlr3.CommonTokenStream(lexer) + parser = self.getParser(tStream) + events = parser.b() + + +if __name__ == '__main__': + unittest.main()