Looks like you are in the clear:


Results :



Failed tests:

  testSetsInCombinedGrammarSentToLexer(org.antlr.test.TestNFAConstruction)

  testFairlyLargeGraph(org.antlr.test.TestTopologicalSort)

  testSimpleTokenDependence(org.antlr.test.TestTopologicalSort)

  testParserLexerCombo(org.antlr.test.TestTopologicalSort)

  testLiteralInParserAndLexer(org.antlr.test.TestSymbolDefinitions)

  testRuleLabels(org.antlr.test.TestAttributes)

  testRuleLabelOnTwoDifferentRulesAST(org.antlr.test.TestAttributes)

  testRuleLabelOnTwoDifferentRulesTemplate(org.antlr.test.TestAttributes)

  testRefToTextAttributeForCurrentTreeRule(org.antlr.test.TestAttributes)

  testWarningForUndefinedToken(org.antlr.test.TestCompositeGrammars)



Tests in error:

  testRuleLabelBeforeRefToPredefinedAttr(org.antlr.test.TestAttributes)

  testRefToTextAttributeForCurrentRule(org.antlr.test.TestAttributes)

  testRuleLabelFromMultipleAlts(org.antlr.test.TestAttributes)

  testAssignToTreeNodeAttribute(org.antlr.test.TestAttributes)



Tests run: 946, Failures: 10, Errors: 4, Skipped: 1



Jim



From: [email protected] [mailto:[email protected]] On 
Behalf Of Sam Harwell
Sent: Monday, November 02, 2009 10:39 AM
To: [email protected]
Subject: [antlr-dev] Some of my unit tests are failing - where did I go wrong?



I'm getting the following error when running the 
TestRuleLabelBeforeRefToPredefinedAttr unit test:



TestRuleLabelBeforeRefToPredefinedAttr threw exception:  
System.ArgumentException: no such attribute: TREE_PARSER in template context 
[ruleLabelPropertyRef_text].



Is this unit test working correctly for you? If so, where is it resolving the 
TREE_PARSER attribute from?



If you're interested, here's my stack trace, which should be directly 
translatable to the Java code:



Antlr3.ST.StringTemplate.CheckNullAttributeAgainstFormalArguments(StringTemplate
 self, String attribute) in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\StringTemplate.cs:
 line 1688

Antlr3.ST.StringTemplate.GetAttribute(String name) in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\StringTemplate.cs:
 line 970

Antlr3.ST.Language.ActionEvaluator.attribute() in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\obj\Debug\ActionEvaluator.cs:
 line 1291

Antlr3.ST.Language.ActionEvaluator.expr() in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\obj\Debug\ActionEvaluator.cs:
 line 274

Antlr3.ST.Language.ActionEvaluator.ifAtom() in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\obj\Debug\ActionEvaluator.cs:
 line 1143

Antlr3.ST.Language.ActionEvaluator.ifCondition() in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\obj\Debug\ActionEvaluator.cs:
 line 1089

Antlr3.ST.Language.ConditionalExpr.Write(StringTemplate self, 
IStringTemplateWriter out) in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\Language\ConditionalExpr.cs:
 line 216

Antlr3.ST.StringTemplate.Write(IStringTemplateWriter writer) in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\StringTemplate.cs:
 line 997

Antlr3.ST.StringTemplate.ToString(Int32 lineWidth) in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\StringTemplate.cs:
 line 2071

Antlr3.ST.StringTemplate.ToString() in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.StringTemplate\StringTemplate.cs:
 line 2060

System.Text.StringBuilder.Append(Object value)

Antlr3.Grammars.ActionTranslator.Translate() in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3\Grammars\ActionTranslatorHelper.cs:
 line 108

AntlrUnitTests.TestAttributes.TestRuleLabelBeforeRefToPredefinedAttr() in 
C:\dev\stringtemplate_main\antlrcs\main\Antlr3.Test\TestAttributes.cs: line 482



_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to