Java Doc for TestAttributes.java in  » Parser » antlr-3.0.1 » org » antlr » test » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Parser » antlr 3.0.1 » org.antlr.test 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.antlr.test.BaseTest
   org.antlr.test.TestAttributes

TestAttributes
public class TestAttributes extends BaseTest (Code)
Check the $x, $x.y attributes. For checking the actual translation, assume the Java target. This is still a great test for the semantics of the $x.y stuff regardless of the target.



Constructor Summary
public  TestAttributes()
    

Method Summary
protected  voidcheckError(ErrorQueue equeue, GrammarSemanticsMessage expectedMessage)
    
protected  voidcheckErrors(ErrorQueue equeue, ArrayList expectedMessages)
    
public  voidtest0IndexedGlobalScope()
    
public  voidtestAbsoluteIndexedGlobalScope()
    
public  voidtestAmbiguousTokenRef()
    
public  voidtestAmbiguousTokenRefWithProp()
    
public  voidtestArgReturnValueMismatch()
    
public  voidtestArgsOnToken()
    
public  voidtestArgsOnTokenInLexer()
    
public  voidtestArgsOnTokenInLexerRuleOfCombined()
    
public  voidtestArgsWhenNoneDefined()
    
public  voidtestArgsWithInitValues()
    
public  voidtestArguments()
    
public  voidtestAssignToOwnParamAttr()
    
public  voidtestAssignToOwnRulenameAttr()
    
public  voidtestAssignToTreeNodeAttribute()
    
public  voidtestBasicGlobalScope()
    
public  voidtestBasicRuleScope()
    
public  voidtestCStyleReturnInitValue()
    
public  voidtestCharLabelInLexer()
    
public  voidtestCharListLabelInLexer()
    
public  voidtestDoNotTranslateAttributeCompare()
    
public  voidtestDoNotTranslateScopeAttributeCompare()
    
public  voidtestDynamicRuleScopeRefInSubrule()
    
public  voidtestDynamicScopeRefOkEvenThoughRuleRefExists()
    
public  voidtestEscaped$InAction()
    
public  voidtestEscapedLessThanInAction()
    
public  voidtestForwardRefRuleLabels()
    
public  voidtestFullyQualifiedRefToCurrentRuleParameter()
    
public  voidtestFullyQualifiedRefToCurrentRuleRetVal()
    
public  voidtestFullyQualifiedRefToTemplateAttributeInCurrentRule()
    
public  voidtestGlobalScopeOutsideRule()
    
public  voidtestIllegalAssignRuleRefAttr()
    
public  voidtestIllegalAssignToLocalAttr()
    
public  voidtestIllegalAssignToOwnRulenameAttr()
    
public  voidtestIllegalAssignTokenRefAttr()
    
public  voidtestImplicitRuleLabel()
    
public  voidtestImplicitTokenLabel()
    
public  voidtestIndexedGlobalScope()
    
public  voidtestInvalidArguments()
    
public  voidtestInvalidReturnValues()
    
public  voidtestInvalidRuleAttribute()
    
public  voidtestInvalidRuleLabelAccessesParameter()
    
public  voidtestInvalidRuleLabelAccessesScopeAttribute()
    
public  voidtestIsolatedDynamicRuleScopeRef()
    
public  voidtestIsolatedGlobalScopeRef()
    
public  voidtestIsolatedRefToCurrentRule()
    
public  voidtestIsolatedRefToRule()
    
public  voidtestLabelOnRuleRefInLexer()
    
public  voidtestLexerLabelRefs()
    
public  voidtestLexerRulePropertyRefs()
    
public  voidtestListAndRuleLabelTypeMismatch()
    
public  voidtestListAndTokenLabelTypeMismatch()
    
public  voidtestMissingArgs()
    
public  voidtestMissingArgsInLexer()
    
public  voidtestMissingArgsOnTokenInLexerRuleOfCombined()
    
public  voidtestMissingRuleAttribute()
    
public  voidtestMissingUnlabeledRuleAttribute()
    
public  voidtestMultipleReturnInitValue()
    
public  voidtestNonDynamicAttributeOutsideRule()
    
public  voidtestNonDynamicAttributeOutsideRule2()
    
public  voidtestPlusEqualSetLabel()
    
public  voidtestPlusEqualStringLabel()
    
public  voidtestPlusEqualWildcardLabel()
    
public  voidtestRefToReturnValueBeforeRefToPredefinedAttr()
     $x.start refs are checked during translation not before so ANTLR misses the fact that rule r has refs to predefined attributes if the ref is after the def of the method or self-referential.
public  voidtestRefToRuleRefInLexer()
    
public  voidtestRefToRuleRefInLexerNoAttribute()
    
public  voidtestRefToStartAttributeForCurrentRule()
    
public  voidtestRefToTemplateAttributeForCurrentRule()
    
public  voidtestRefToTextAttributeForCurrentRule()
    
public  voidtestRefToTextAttributeForCurrentTreeRule()
    
public  voidtestReturnInitValue()
    
public  voidtestReturnValue()
    
public  voidtestReturnValueWithNumber()
    
public  voidtestReturnValues()
    
public  voidtestReturnWithMultipleRuleRefs()
    
public  voidtestReuseExistingLabelWithImplicitRuleLabel()
    
public  voidtestReuseExistingLabelWithImplicitTokenLabel()
    
public  voidtestReuseExistingListLabelWithImplicitRuleLabel()
    
public  voidtestReuseExistingListLabelWithImplicitTokenLabel()
    
public  voidtestRuleAndTokenLabelTypeMismatch()
    
public  voidtestRuleLabelBeforeRefToPredefinedAttr()
    
public  voidtestRuleLabelFromMultipleAlts()
    
public  voidtestRuleLabelOnTwoDifferentRulesAST()
    
public  voidtestRuleLabelOnTwoDifferentRulesTemplate()
    
public  voidtestRuleLabelWithoutOutputOption()
    
public  voidtestRuleLabels()
    
public  voidtestRuleLabelsWithSpecialToken()
    
public  voidtestRuleRefWhenRuleHasScope()
    
public  voidtestRuleRefWithDynamicScope()
    
public  voidtestRuleScopeFromAnotherRule()
    
public  voidtestRuleScopeOutsideRule()
    
public  voidtestScopeAndAttributeWithUnderscore()
    
public  voidtestSetFullyQualifiedRefToCurrentRuleRetVal()
    
public  voidtestSettingLexerRulePropertyRefs()
    
public  voidtestSharedGlobalScope()
    
public  voidtestSimplePlusEqualLabel()
    
public  voidtestTokenLabelFromMultipleAlts()
    
public  voidtestTokenLabelTreeProperty()
    
public  voidtestTokenLabels()
    
public  voidtestTokenRefTreeProperty()
    
public  voidtestTreeRuleStopAttributeIsInvalid()
    
public  voidtestUnknownDynamicAttribute()
    
public  voidtestUnknownGlobalDynamicAttribute()
    
public  voidtestUnknownGlobalScope()
    
public  voidtestUnqualifiedRuleScopeAccessInsideRule()
    
public  voidtestUnqualifiedRuleScopeAttribute()
    
public  voidtestWildcardCharLabelInLexer()
    
public  voidtestWildcardCharListLabelInLexer()
    


Constructor Detail
TestAttributes
public TestAttributes()(Code)
Public default constructor used by TestRig




Method Detail
checkError
protected void checkError(ErrorQueue equeue, GrammarSemanticsMessage expectedMessage) throws Exception(Code)



checkErrors
protected void checkErrors(ErrorQueue equeue, ArrayList expectedMessages) throws Exception(Code)
Allow checking for multiple errors in one test



test0IndexedGlobalScope
public void test0IndexedGlobalScope() throws Exception(Code)



testAbsoluteIndexedGlobalScope
public void testAbsoluteIndexedGlobalScope() throws Exception(Code)



testAmbiguousTokenRef
public void testAmbiguousTokenRef() throws Exception(Code)



testAmbiguousTokenRefWithProp
public void testAmbiguousTokenRefWithProp() throws Exception(Code)



testArgReturnValueMismatch
public void testArgReturnValueMismatch() throws Exception(Code)



testArgsOnToken
public void testArgsOnToken() throws Exception(Code)



testArgsOnTokenInLexer
public void testArgsOnTokenInLexer() throws Exception(Code)



testArgsOnTokenInLexerRuleOfCombined
public void testArgsOnTokenInLexerRuleOfCombined() throws Exception(Code)



testArgsWhenNoneDefined
public void testArgsWhenNoneDefined() throws Exception(Code)



testArgsWithInitValues
public void testArgsWithInitValues() throws Exception(Code)



testArguments
public void testArguments() throws Exception(Code)



testAssignToOwnParamAttr
public void testAssignToOwnParamAttr() throws Exception(Code)



testAssignToOwnRulenameAttr
public void testAssignToOwnRulenameAttr() throws Exception(Code)



testAssignToTreeNodeAttribute
public void testAssignToTreeNodeAttribute() throws Exception(Code)



testBasicGlobalScope
public void testBasicGlobalScope() throws Exception(Code)



testBasicRuleScope
public void testBasicRuleScope() throws Exception(Code)



testCStyleReturnInitValue
public void testCStyleReturnInitValue() throws Exception(Code)



testCharLabelInLexer
public void testCharLabelInLexer() throws Exception(Code)



testCharListLabelInLexer
public void testCharListLabelInLexer() throws Exception(Code)



testDoNotTranslateAttributeCompare
public void testDoNotTranslateAttributeCompare() throws Exception(Code)



testDoNotTranslateScopeAttributeCompare
public void testDoNotTranslateScopeAttributeCompare() throws Exception(Code)



testDynamicRuleScopeRefInSubrule
public void testDynamicRuleScopeRefInSubrule() throws Exception(Code)



testDynamicScopeRefOkEvenThoughRuleRefExists
public void testDynamicScopeRefOkEvenThoughRuleRefExists() throws Exception(Code)



testEscaped$InAction
public void testEscaped$InAction() throws Exception(Code)



testEscapedLessThanInAction
public void testEscapedLessThanInAction() throws Exception(Code)



testForwardRefRuleLabels
public void testForwardRefRuleLabels() throws Exception(Code)



testFullyQualifiedRefToCurrentRuleParameter
public void testFullyQualifiedRefToCurrentRuleParameter() throws Exception(Code)



testFullyQualifiedRefToCurrentRuleRetVal
public void testFullyQualifiedRefToCurrentRuleRetVal() throws Exception(Code)



testFullyQualifiedRefToTemplateAttributeInCurrentRule
public void testFullyQualifiedRefToTemplateAttributeInCurrentRule() throws Exception(Code)



testGlobalScopeOutsideRule
public void testGlobalScopeOutsideRule() throws Exception(Code)



testIllegalAssignRuleRefAttr
public void testIllegalAssignRuleRefAttr() throws Exception(Code)



testIllegalAssignToLocalAttr
public void testIllegalAssignToLocalAttr() throws Exception(Code)



testIllegalAssignToOwnRulenameAttr
public void testIllegalAssignToOwnRulenameAttr() throws Exception(Code)



testIllegalAssignTokenRefAttr
public void testIllegalAssignTokenRefAttr() throws Exception(Code)



testImplicitRuleLabel
public void testImplicitRuleLabel() throws Exception(Code)



testImplicitTokenLabel
public void testImplicitTokenLabel() throws Exception(Code)



testIndexedGlobalScope
public void testIndexedGlobalScope() throws Exception(Code)



testInvalidArguments
public void testInvalidArguments() throws Exception(Code)



testInvalidReturnValues
public void testInvalidReturnValues() throws Exception(Code)



testInvalidRuleAttribute
public void testInvalidRuleAttribute() throws Exception(Code)



testInvalidRuleLabelAccessesParameter
public void testInvalidRuleLabelAccessesParameter() throws Exception(Code)



testInvalidRuleLabelAccessesScopeAttribute
public void testInvalidRuleLabelAccessesScopeAttribute() throws Exception(Code)



testIsolatedDynamicRuleScopeRef
public void testIsolatedDynamicRuleScopeRef() throws Exception(Code)



testIsolatedGlobalScopeRef
public void testIsolatedGlobalScopeRef() throws Exception(Code)



testIsolatedRefToCurrentRule
public void testIsolatedRefToCurrentRule() throws Exception(Code)



testIsolatedRefToRule
public void testIsolatedRefToRule() throws Exception(Code)



testLabelOnRuleRefInLexer
public void testLabelOnRuleRefInLexer() throws Exception(Code)



testLexerLabelRefs
public void testLexerLabelRefs() throws Exception(Code)



testLexerRulePropertyRefs
public void testLexerRulePropertyRefs() throws Exception(Code)



testListAndRuleLabelTypeMismatch
public void testListAndRuleLabelTypeMismatch() throws Exception(Code)



testListAndTokenLabelTypeMismatch
public void testListAndTokenLabelTypeMismatch() throws Exception(Code)



testMissingArgs
public void testMissingArgs() throws Exception(Code)



testMissingArgsInLexer
public void testMissingArgsInLexer() throws Exception(Code)



testMissingArgsOnTokenInLexerRuleOfCombined
public void testMissingArgsOnTokenInLexerRuleOfCombined() throws Exception(Code)



testMissingRuleAttribute
public void testMissingRuleAttribute() throws Exception(Code)



testMissingUnlabeledRuleAttribute
public void testMissingUnlabeledRuleAttribute() throws Exception(Code)



testMultipleReturnInitValue
public void testMultipleReturnInitValue() throws Exception(Code)



testNonDynamicAttributeOutsideRule
public void testNonDynamicAttributeOutsideRule() throws Exception(Code)



testNonDynamicAttributeOutsideRule2
public void testNonDynamicAttributeOutsideRule2() throws Exception(Code)



testPlusEqualSetLabel
public void testPlusEqualSetLabel() throws Exception(Code)



testPlusEqualStringLabel
public void testPlusEqualStringLabel() throws Exception(Code)



testPlusEqualWildcardLabel
public void testPlusEqualWildcardLabel() throws Exception(Code)



testRefToReturnValueBeforeRefToPredefinedAttr
public void testRefToReturnValueBeforeRefToPredefinedAttr() throws Exception(Code)
$x.start refs are checked during translation not before so ANTLR misses the fact that rule r has refs to predefined attributes if the ref is after the def of the method or self-referential. Actually would be ok if I didn't convert actions to strings; keep as templates. June 9, 2006: made action translation leave templates not strings



testRefToRuleRefInLexer
public void testRefToRuleRefInLexer() throws Exception(Code)



testRefToRuleRefInLexerNoAttribute
public void testRefToRuleRefInLexerNoAttribute() throws Exception(Code)



testRefToStartAttributeForCurrentRule
public void testRefToStartAttributeForCurrentRule() throws Exception(Code)



testRefToTemplateAttributeForCurrentRule
public void testRefToTemplateAttributeForCurrentRule() throws Exception(Code)



testRefToTextAttributeForCurrentRule
public void testRefToTextAttributeForCurrentRule() throws Exception(Code)



testRefToTextAttributeForCurrentTreeRule
public void testRefToTextAttributeForCurrentTreeRule() throws Exception(Code)



testReturnInitValue
public void testReturnInitValue() throws Exception(Code)



testReturnValue
public void testReturnValue() throws Exception(Code)



testReturnValueWithNumber
public void testReturnValueWithNumber() throws Exception(Code)



testReturnValues
public void testReturnValues() throws Exception(Code)



testReturnWithMultipleRuleRefs
public void testReturnWithMultipleRuleRefs() throws Exception(Code)



testReuseExistingLabelWithImplicitRuleLabel
public void testReuseExistingLabelWithImplicitRuleLabel() throws Exception(Code)



testReuseExistingLabelWithImplicitTokenLabel
public void testReuseExistingLabelWithImplicitTokenLabel() throws Exception(Code)



testReuseExistingListLabelWithImplicitRuleLabel
public void testReuseExistingListLabelWithImplicitRuleLabel() throws Exception(Code)



testReuseExistingListLabelWithImplicitTokenLabel
public void testReuseExistingListLabelWithImplicitTokenLabel() throws Exception(Code)



testRuleAndTokenLabelTypeMismatch
public void testRuleAndTokenLabelTypeMismatch() throws Exception(Code)



testRuleLabelBeforeRefToPredefinedAttr
public void testRuleLabelBeforeRefToPredefinedAttr() throws Exception(Code)



testRuleLabelFromMultipleAlts
public void testRuleLabelFromMultipleAlts() throws Exception(Code)



testRuleLabelOnTwoDifferentRulesAST
public void testRuleLabelOnTwoDifferentRulesAST() throws Exception(Code)



testRuleLabelOnTwoDifferentRulesTemplate
public void testRuleLabelOnTwoDifferentRulesTemplate() throws Exception(Code)



testRuleLabelWithoutOutputOption
public void testRuleLabelWithoutOutputOption() throws Exception(Code)



testRuleLabels
public void testRuleLabels() throws Exception(Code)



testRuleLabelsWithSpecialToken
public void testRuleLabelsWithSpecialToken() throws Exception(Code)



testRuleRefWhenRuleHasScope
public void testRuleRefWhenRuleHasScope() throws Exception(Code)



testRuleRefWithDynamicScope
public void testRuleRefWithDynamicScope() throws Exception(Code)



testRuleScopeFromAnotherRule
public void testRuleScopeFromAnotherRule() throws Exception(Code)



testRuleScopeOutsideRule
public void testRuleScopeOutsideRule() throws Exception(Code)



testScopeAndAttributeWithUnderscore
public void testScopeAndAttributeWithUnderscore() throws Exception(Code)



testSetFullyQualifiedRefToCurrentRuleRetVal
public void testSetFullyQualifiedRefToCurrentRuleRetVal() throws Exception(Code)



testSettingLexerRulePropertyRefs
public void testSettingLexerRulePropertyRefs() throws Exception(Code)



testSharedGlobalScope
public void testSharedGlobalScope() throws Exception(Code)



testSimplePlusEqualLabel
public void testSimplePlusEqualLabel() throws Exception(Code)



testTokenLabelFromMultipleAlts
public void testTokenLabelFromMultipleAlts() throws Exception(Code)



testTokenLabelTreeProperty
public void testTokenLabelTreeProperty() throws Exception(Code)



testTokenLabels
public void testTokenLabels() throws Exception(Code)



testTokenRefTreeProperty
public void testTokenRefTreeProperty() throws Exception(Code)



testTreeRuleStopAttributeIsInvalid
public void testTreeRuleStopAttributeIsInvalid() throws Exception(Code)



testUnknownDynamicAttribute
public void testUnknownDynamicAttribute() throws Exception(Code)



testUnknownGlobalDynamicAttribute
public void testUnknownGlobalDynamicAttribute() throws Exception(Code)



testUnknownGlobalScope
public void testUnknownGlobalScope() throws Exception(Code)



testUnqualifiedRuleScopeAccessInsideRule
public void testUnqualifiedRuleScopeAccessInsideRule() throws Exception(Code)



testUnqualifiedRuleScopeAttribute
public void testUnqualifiedRuleScopeAttribute() throws Exception(Code)



testWildcardCharLabelInLexer
public void testWildcardCharLabelInLexer() throws Exception(Code)



testWildcardCharListLabelInLexer
public void testWildcardCharListLabelInLexer() throws Exception(Code)



Fields inherited from org.antlr.test.BaseTest
final public static String CLASSPATH(Code)(Java Doc)
final public static String jikes(Code)(Java Doc)
final public static String pathSep(Code)(Java Doc)
protected String stderr(Code)(Java Doc)
final public static String tmpdir(Code)(Java Doc)

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)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.