org.antlr.test
Class TestRewriteAST
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.antlr.test.BaseTest
org.antlr.test.TestRewriteAST
- All Implemented Interfaces:
- junit.framework.Test
- Direct Known Subclasses:
- DebugTestRewriteAST
public class TestRewriteAST
- extends BaseTest
Field Summary |
protected boolean |
debug
|
Methods inherited from class org.antlr.test.BaseTest |
antlr, checkGrammarSemanticsError, checkGrammarSemanticsWarning, compile, eraseFiles, execLexer, execParser, execTreeParser, execTreeParser, getFirstLineOfException, mkdir, newTool, newTool, rawExecRecognizer, rawGenerateAndBuildRecognizer, realElements, realElements, setUp, writeFile, writeLexerTestFile, writeTemplateTestFile, writeTestFile, writeTreeAndTreeTestFile, writeTreeTestFile |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
debug
protected boolean debug
TestRewriteAST
public TestRewriteAST()
testDelete
public void testDelete()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSingleToken
public void testSingleToken()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSingleTokenToNewNode
public void testSingleTokenToNewNode()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSingleTokenToNewNodeRoot
public void testSingleTokenToNewNodeRoot()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSingleTokenToNewNode2
public void testSingleTokenToNewNode2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSingleCharLiteral
public void testSingleCharLiteral()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSingleStringLiteral
public void testSingleStringLiteral()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSingleRule
public void testSingleRule()
throws java.lang.Exception
- Throws:
java.lang.Exception
testReorderTokens
public void testReorderTokens()
throws java.lang.Exception
- Throws:
java.lang.Exception
testReorderTokenAndRule
public void testReorderTokenAndRule()
throws java.lang.Exception
- Throws:
java.lang.Exception
testTokenTree
public void testTokenTree()
throws java.lang.Exception
- Throws:
java.lang.Exception
testTokenTreeAfterOtherStuff
public void testTokenTreeAfterOtherStuff()
throws java.lang.Exception
- Throws:
java.lang.Exception
testNestedTokenTreeWithOuterLoop
public void testNestedTokenTreeWithOuterLoop()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptionalSingleToken
public void testOptionalSingleToken()
throws java.lang.Exception
- Throws:
java.lang.Exception
testClosureSingleToken
public void testClosureSingleToken()
throws java.lang.Exception
- Throws:
java.lang.Exception
testPositiveClosureSingleToken
public void testPositiveClosureSingleToken()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptionalSingleRule
public void testOptionalSingleRule()
throws java.lang.Exception
- Throws:
java.lang.Exception
testClosureSingleRule
public void testClosureSingleRule()
throws java.lang.Exception
- Throws:
java.lang.Exception
testClosureOfLabel
public void testClosureOfLabel()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptionalLabelNoListLabel
public void testOptionalLabelNoListLabel()
throws java.lang.Exception
- Throws:
java.lang.Exception
testPositiveClosureSingleRule
public void testPositiveClosureSingleRule()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSinglePredicateT
public void testSinglePredicateT()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSinglePredicateF
public void testSinglePredicateF()
throws java.lang.Exception
- Throws:
java.lang.Exception
testMultiplePredicate
public void testMultiplePredicate()
throws java.lang.Exception
- Throws:
java.lang.Exception
testMultiplePredicateTrees
public void testMultiplePredicateTrees()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSimpleTree
public void testSimpleTree()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSimpleTree2
public void testSimpleTree2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testNestedTrees
public void testNestedTrees()
throws java.lang.Exception
- Throws:
java.lang.Exception
testImaginaryTokenCopy
public void testImaginaryTokenCopy()
throws java.lang.Exception
- Throws:
java.lang.Exception
testTokenUnreferencedOnLeftButDefined
public void testTokenUnreferencedOnLeftButDefined()
throws java.lang.Exception
- Throws:
java.lang.Exception
testImaginaryTokenCopySetText
public void testImaginaryTokenCopySetText()
throws java.lang.Exception
- Throws:
java.lang.Exception
testImaginaryTokenNoCopyFromToken
public void testImaginaryTokenNoCopyFromToken()
throws java.lang.Exception
- Throws:
java.lang.Exception
testImaginaryTokenNoCopyFromTokenSetText
public void testImaginaryTokenNoCopyFromTokenSetText()
throws java.lang.Exception
- Throws:
java.lang.Exception
testMixedRewriteAndAutoAST
public void testMixedRewriteAndAutoAST()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSubruleWithRewrite
public void testSubruleWithRewrite()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSubruleWithRewrite2
public void testSubruleWithRewrite2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testNestedRewriteShutsOffAutoAST
public void testNestedRewriteShutsOffAutoAST()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRewriteActions
public void testRewriteActions()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRewriteActions2
public void testRewriteActions2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRefToOldValue
public void testRefToOldValue()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopySemanticsForRules
public void testCopySemanticsForRules()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopySemanticsForRules2
public void testCopySemanticsForRules2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopySemanticsForRules3
public void testCopySemanticsForRules3()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopySemanticsForRules3Double
public void testCopySemanticsForRules3Double()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopySemanticsForRules4
public void testCopySemanticsForRules4()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopySemanticsLists
public void testCopySemanticsLists()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopyRuleLabel
public void testCopyRuleLabel()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopyRuleLabel2
public void testCopyRuleLabel2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testQueueingOfTokens
public void testQueueingOfTokens()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCopyOfTokens
public void testCopyOfTokens()
throws java.lang.Exception
- Throws:
java.lang.Exception
testTokenCopyInLoop
public void testTokenCopyInLoop()
throws java.lang.Exception
- Throws:
java.lang.Exception
testTokenCopyInLoopAgainstTwoOthers
public void testTokenCopyInLoopAgainstTwoOthers()
throws java.lang.Exception
- Throws:
java.lang.Exception
testListRefdOneAtATime
public void testListRefdOneAtATime()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSplitListWithLabels
public void testSplitListWithLabels()
throws java.lang.Exception
- Throws:
java.lang.Exception
testComplicatedMelange
public void testComplicatedMelange()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRuleLabel
public void testRuleLabel()
throws java.lang.Exception
- Throws:
java.lang.Exception
testAmbiguousRule
public void testAmbiguousRule()
throws java.lang.Exception
- Throws:
java.lang.Exception
testWeirdRuleRef
public void testWeirdRuleRef()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRuleListLabel
public void testRuleListLabel()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRuleListLabel2
public void testRuleListLabel2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptional
public void testOptional()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptional2
public void testOptional2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptional3
public void testOptional3()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptional4
public void testOptional4()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptional5
public void testOptional5()
throws java.lang.Exception
- Throws:
java.lang.Exception
testArbitraryExprType
public void testArbitraryExprType()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSet
public void testSet()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSet2
public void testSet2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSetWithLabel
public void testSetWithLabel()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRewriteAction
public void testRewriteAction()
throws java.lang.Exception
- Throws:
java.lang.Exception
testOptionalSubruleWithoutRealElements
public void testOptionalSubruleWithoutRealElements()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCardinality
public void testCardinality()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCardinality2
public void testCardinality2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCardinality3
public void testCardinality3()
throws java.lang.Exception
- Throws:
java.lang.Exception
testLoopCardinality
public void testLoopCardinality()
throws java.lang.Exception
- Throws:
java.lang.Exception
testWildcard
public void testWildcard()
throws java.lang.Exception
- Throws:
java.lang.Exception
testUnknownRule
public void testUnknownRule()
throws java.lang.Exception
- Throws:
java.lang.Exception
testKnownRuleButNotInLHS
public void testKnownRuleButNotInLHS()
throws java.lang.Exception
- Throws:
java.lang.Exception
testUnknownToken
public void testUnknownToken()
throws java.lang.Exception
- Throws:
java.lang.Exception
testUnknownLabel
public void testUnknownLabel()
throws java.lang.Exception
- Throws:
java.lang.Exception
testUnknownCharLiteralToken
public void testUnknownCharLiteralToken()
throws java.lang.Exception
- Throws:
java.lang.Exception
testUnknownStringLiteralToken
public void testUnknownStringLiteralToken()
throws java.lang.Exception
- Throws:
java.lang.Exception
testExtraTokenInSimpleDecl
public void testExtraTokenInSimpleDecl()
throws java.lang.Exception
- Throws:
java.lang.Exception
testMissingIDInSimpleDecl
public void testMissingIDInSimpleDecl()
throws java.lang.Exception
- Throws:
java.lang.Exception
testMissingSetInSimpleDecl
public void testMissingSetInSimpleDecl()
throws java.lang.Exception
- Throws:
java.lang.Exception
testMissingTokenGivesErrorNode
public void testMissingTokenGivesErrorNode()
throws java.lang.Exception
- Throws:
java.lang.Exception
testExtraTokenGivesErrorNode
public void testExtraTokenGivesErrorNode()
throws java.lang.Exception
- Throws:
java.lang.Exception
testMissingFirstTokenGivesErrorNode
public void testMissingFirstTokenGivesErrorNode()
throws java.lang.Exception
- Throws:
java.lang.Exception
testMissingFirstTokenGivesErrorNode2
public void testMissingFirstTokenGivesErrorNode2()
throws java.lang.Exception
- Throws:
java.lang.Exception
testNoViableAltGivesErrorNode
public void testNoViableAltGivesErrorNode()
throws java.lang.Exception
- Throws:
java.lang.Exception
checkError
protected void checkError(ErrorQueue equeue,
GrammarSemanticsMessage expectedMessage)
throws java.lang.Exception
- Throws:
java.lang.Exception