| org.antlr.test.BaseTest org.antlr.test.TestSemanticPredicates
TestSemanticPredicates | public class TestSemanticPredicates extends BaseTest (Code) | | |
TestSemanticPredicates | public TestSemanticPredicates()(Code) | | Public default constructor used by TestRig
|
checkDecision | protected void checkDecision(Grammar g, int decision, String expecting, int[] expectingUnreachableAlts, int[] expectingNonDetAlts, String expectingAmbigInput, int[] expectingInsufficientPredAlts, int[] expectingDanglingAlts, int expectingNumWarnings) throws Exception(Code) | | |
testDefaultPredNakedAltIsLast | public void testDefaultPredNakedAltIsLast() throws Exception(Code) | | |
testDefaultPredNakedAltNotLast | public void testDefaultPredNakedAltNotLast() throws Exception(Code) | | |
testGatedPredDoesNotForceAllToBeGated | public void testGatedPredDoesNotForceAllToBeGated() throws Exception(Code) | | |
testGatedPredDoesNotForceAllToBeGated2 | public void testGatedPredDoesNotForceAllToBeGated2() throws Exception(Code) | | |
testGatedPredHoistsAndCanBeInStopState | public void testGatedPredHoistsAndCanBeInStopState() throws Exception(Code) | | |
testGatedPredInCyclicDFA | public void testGatedPredInCyclicDFA() throws Exception(Code) | | |
testGatedPredNotActuallyUsedOnEdges | public void testGatedPredNotActuallyUsedOnEdges() throws Exception(Code) | | |
testHoistCorrectContext | public void testHoistCorrectContext() throws Exception(Code) | | |
testIgnorePredFromLL2AltLastAltIsDefaultTrue | public void testIgnorePredFromLL2AltLastAltIsDefaultTrue() throws Exception(Code) | | |
testIgnorePredFromLL2AltPredUnionNeeded | public void testIgnorePredFromLL2AltPredUnionNeeded() throws Exception(Code) | | |
testIgnoresHoistingDepthGreaterThanZero | public void testIgnoresHoistingDepthGreaterThanZero() throws Exception(Code) | | |
testIncompleteSemanticHoistedContext | public void testIncompleteSemanticHoistedContext() throws Exception(Code) | | The following grammar should yield an error that rule 'a' has
insufficient semantic info pulled from 'b'.
|
testIncompleteSemanticHoistedContext2 | public void testIncompleteSemanticHoistedContext2() throws Exception(Code) | | The following grammar should yield an error that rule 'a' has
insufficient semantic info pulled from 'b'. This is the same
as the previous case except that the D prevents the B path from
"pinching" together into a single NFA state.
This test also demonstrates that just because B D could predict
alt 1 in rule 'a', it is unnecessary to continue NFA->DFA
conversion to include an edge for D. Alt 1 is the only possible
prediction because we resolve the ambiguity by choosing alt 1.
|
testLeftRecursivePred | public void testLeftRecursivePred() throws Exception(Code) | | |
testLexerMatchesLongestThenTestPred | public void testLexerMatchesLongestThenTestPred() throws Exception(Code) | | |
testMatchesLongestThenTestPred | public void testMatchesLongestThenTestPred() throws Exception(Code) | | |
testPredGets2SymbolSyntacticContext | public void testPredGets2SymbolSyntacticContext() throws Exception(Code) | | |
testPredWithArbitraryLookahead | public void testPredWithArbitraryLookahead() throws Exception(Code) | | |
testPredicatedToStayInLoop | public void testPredicatedToStayInLoop() throws Exception(Code) | | |
testPredsButSyntaxResolves | public void testPredsButSyntaxResolves() throws Exception(Code) | | |
testPredsUsedAfterRecursionOverflow | public void testPredsUsedAfterRecursionOverflow() throws Exception(Code) | | |
testTooFewSemanticPredicates | public void testTooFewSemanticPredicates() throws Exception(Code) | | |
testUniquePredicateOR | public void testUniquePredicateOR() throws Exception(Code) | | For a DFA state with lots of configurations that have the same
predicate, don't just OR them all together as it's a waste to
test a||a||b||a||a etc... ANTLR makes a unique set and THEN
OR's them together.
|
Methods inherited from org.antlr.test.BaseTest | protected boolean antlr(String fileName, String grammarFileName, String grammarStr, boolean debug)(Code)(Java Doc) protected boolean compile(String fileName)(Code)(Java Doc) protected void eraseFiles(String filesEndingWith)(Code)(Java Doc) protected String execParser(String grammarFileName, String grammarStr, String parserName, String lexerName, String startRuleName, String input, boolean debug)(Code)(Java Doc) protected String execTreeParser(String parserGrammarFileName, String parserGrammarStr, String parserName, String treeParserGrammarFileName, String treeParserGrammarStr, String treeParserName, String lexerName, String parserStartRuleName, String treeParserStartRuleName, String input)(Code)(Java Doc) protected String execTreeParser(String parserGrammarFileName, String parserGrammarStr, String parserName, String treeParserGrammarFileName, String treeParserGrammarStr, String treeParserName, String lexerName, String parserStartRuleName, String treeParserStartRuleName, String input, boolean debug)(Code)(Java Doc) public String getFirstLineOfException()(Code)(Java Doc) protected void mkdir(String dir)(Code)(Java Doc) protected Tool newTool()(Code)(Java Doc) protected String rawExecRecognizer(String parserName, String treeParserName, String lexerName, String parserStartRuleName, String treeParserStartRuleName, boolean parserBuildsTrees, boolean parserBuildsTemplate, boolean debug)(Code)(Java Doc) protected boolean rawGenerateAndBuildRecognizer(String grammarFileName, String grammarStr, String parserName, String lexerName, boolean debug)(Code)(Java Doc) protected void writeFile(String dir, String fileName, String content)(Code)(Java Doc) protected void writeTemplateTestFile(String parserName, String lexerName, String parserStartRuleName, boolean debug)(Code)(Java Doc) protected void writeTestFile(String parserName, String lexerName, String parserStartRuleName, boolean debug)(Code)(Java Doc) protected void writeTreeTestFile(String parserName, String treeParserName, String lexerName, String parserStartRuleName, String treeParserStartRuleName, boolean debug)(Code)(Java Doc)
|
|
|