Terence Parr schrieb:
>
> On Feb 20, 2009, at 10:58 AM, Johannes Luber wrote:
>> I've forgot to run the example build script and noticed a strange
>> problem for the Java composite-grammar. The code for Java_Expr.cs
>> appends FailedPredicateException with numbers, e.g.
>> FailedPredicateException3. Considering that the class doesn't change the
>> name, the compilation fails. I've thought at first that my change to
>> append <decisionNumber> to some exception variable names went too far,
>> but the only place referring to FailedPredicateException doesn't seem to
>> be wrong.
>>
>> I've tried to add debug information but using Jim's little bash script
>> with
>>
>>
>> a3 -XdbgSt Java.g
>>
>> doesn't seem to work. Now I don't know where the error actually comes
>> from and can't find it out... :(
>
> -XdbgST not St
Damn - and I did specifically copy the option into my notes so I don't
make that mistake again. Which doesn't work if you save the wrong
spelling. :( In any case, I'm still no further to solve the problem. The
generated code is as follows (some extranous code removed):
<CSharp2.validateSemanticPredicate>if ( !(...) )
{
...
throw new FailedPredicateException3(...);
}</CSharp2.validateSemanticPredicate>
As one can clearly see, the template validateSemanticPredicate() is
called. The definition is as follows:
validateSemanticPredicate(pred,description) ::= <<
if ( !(<evalPredicate(...)>) )
{
<ruleBacktrackFailure()>
throw new FailedPredicateException(input, "<ruleName>",
"<description>");
}
>>
Where does the "3" come from? I did even regenerate my snapshot, but it
didn't change a thing.
Johannes
>
> Ter
>
_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev