org.antlr.test
Class TestTreeGrammarRewriteAST

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.antlr.test.BaseTest
              extended by org.antlr.test.TestTreeGrammarRewriteAST
All Implemented Interfaces:
junit.framework.Test

public class TestTreeGrammarRewriteAST
extends BaseTest

Tree rewrites in tree parsers are basically identical to rewrites in a normal grammar except that the atomic element is a node not a Token. Tests here ensure duplication of nodes occurs properly and basic functionality.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.antlr.test.BaseTest
BaseTest.StreamVacuum
 
Field Summary
protected  boolean debug
           
 
Fields inherited from class org.antlr.test.BaseTest
CLASSPATH, jikes, pathSep, stderr, tmpdir
 
Constructor Summary
TestTreeGrammarRewriteAST()
           
 
Method Summary
 void testAutoDup()
           
 void testAutoDupMultiple()
           
 void testAutoDupNestedTree()
           
 void testAutoDupRule()
           
 void testAutoDupTree()
           
 void testAutoDupTree2()
           
 void testAutoDupTreeWithLabels()
           
 void testAutoDupTreeWithListLabels()
           
 void testAutoDupTreeWithRuleRoot()
           
 void testAutoDupTreeWithRuleRootAndLabels()
           
 void testAutoDupTreeWithRuleRootAndListLabels()
           
 void testAutoDupTreeWithSubruleInside()
           
 void testAvoidDup()
           
 void testCombinedRewriteAndAuto()
           
 void testDelete()
           
 void testFlatList()
           
 void testLoop()
           
 void testNonImaginaryWithCtor()
           
 void testRewriteModeChainRuleFlatTree()
           
 void testRewriteModeChainRuleTree()
           
 void testRewriteModeChainRuleTree2()
           
 void testRewriteModeChainRuleTree3()
           
 void testRewriteModeChainRuleTree4()
           
 void testRewriteModeChainRuleTree5()
           
 void testRewriteModeCombinedRewriteAndAuto()
           
 void testRewriteModeFlatTree()
           
 void testRewriteModeWithPredicatedRewrites()
           
 void testRewriteOfRuleRef()
           
 void testRewriteOfRuleRefChild()
           
 void testRewriteOfRuleRefLabel()
           
 void testRewriteOfRuleRefListLabel()
           
 void testRewriteOfRuleRefRoot()
           
 void testRewriteOfRuleRefRootLabeled()
           
 void testRewriteOfRuleRefRootListLabeled()
           
 void testSetMatchNoRewrite()
           
 void testSetMatchNoRewriteLevel2()
           
 void testSetMatchNoRewriteLevel2Root()
           
 void testSetOptionalMatchNoRewrite()
           
 void testSimpleTree()
           
 void testWildcard()
           
 
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
 

Field Detail

debug

protected boolean debug
Constructor Detail

TestTreeGrammarRewriteAST

public TestTreeGrammarRewriteAST()
Method Detail

testFlatList

public void testFlatList()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testSimpleTree

public void testSimpleTree()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testNonImaginaryWithCtor

public void testNonImaginaryWithCtor()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testCombinedRewriteAndAuto

public void testCombinedRewriteAndAuto()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testAvoidDup

public void testAvoidDup()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testLoop

public void testLoop()
              throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDup

public void testAutoDup()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupRule

public void testAutoDupRule()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupMultiple

public void testAutoDupMultiple()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupTree

public void testAutoDupTree()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupTree2

public void testAutoDupTree2()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupTreeWithLabels

public void testAutoDupTreeWithLabels()
                               throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupTreeWithListLabels

public void testAutoDupTreeWithListLabels()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupTreeWithRuleRoot

public void testAutoDupTreeWithRuleRoot()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupTreeWithRuleRootAndLabels

public void testAutoDupTreeWithRuleRootAndLabels()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupTreeWithRuleRootAndListLabels

public void testAutoDupTreeWithRuleRootAndListLabels()
                                              throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupNestedTree

public void testAutoDupNestedTree()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testAutoDupTreeWithSubruleInside

public void testAutoDupTreeWithSubruleInside()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

testDelete

public void testDelete()
                throws java.lang.Exception
Throws:
java.lang.Exception

testSetMatchNoRewrite

public void testSetMatchNoRewrite()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testSetOptionalMatchNoRewrite

public void testSetOptionalMatchNoRewrite()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testSetMatchNoRewriteLevel2

public void testSetMatchNoRewriteLevel2()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testSetMatchNoRewriteLevel2Root

public void testSetMatchNoRewriteLevel2Root()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeCombinedRewriteAndAuto

public void testRewriteModeCombinedRewriteAndAuto()
                                           throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeFlatTree

public void testRewriteModeFlatTree()
                             throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeChainRuleFlatTree

public void testRewriteModeChainRuleFlatTree()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeChainRuleTree

public void testRewriteModeChainRuleTree()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeChainRuleTree2

public void testRewriteModeChainRuleTree2()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeChainRuleTree3

public void testRewriteModeChainRuleTree3()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeChainRuleTree4

public void testRewriteModeChainRuleTree4()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeChainRuleTree5

public void testRewriteModeChainRuleTree5()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteOfRuleRef

public void testRewriteOfRuleRef()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteOfRuleRefRoot

public void testRewriteOfRuleRefRoot()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteOfRuleRefRootLabeled

public void testRewriteOfRuleRefRootLabeled()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteOfRuleRefRootListLabeled

public void testRewriteOfRuleRefRootListLabeled()
                                         throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteOfRuleRefChild

public void testRewriteOfRuleRefChild()
                               throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteOfRuleRefLabel

public void testRewriteOfRuleRefLabel()
                               throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteOfRuleRefListLabel

public void testRewriteOfRuleRefListLabel()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testRewriteModeWithPredicatedRewrites

public void testRewriteModeWithPredicatedRewrites()
                                           throws java.lang.Exception
Throws:
java.lang.Exception

testWildcard

public void testWildcard()
                  throws java.lang.Exception
Throws:
java.lang.Exception