Terence Parr schrieb:
> Ok, I found the predicates
>
> | ('<' '<' '=')=> t1='<' t2='<' t3='='
> { $t1.Line == $t2.Line &&
> $t1.CharPositionInLine + 1 == $t2.CharPositionInLine &&
> $t2.Line == $t3.Line &&
> $t2.CharPositionInLine + 1 == $t3.CharPositionInLine }?
> | ('>' '>' '>' '=')=> t1='>' t2='>' t3='>' t4='='
> { $t1.Line == $t2.Line &&
> $t1.CharPositionInLine + 1 == $t2.CharPositionInLine &&
> $t2.Line == $t3.Line &&
> $t2.CharPositionInLine + 1 == $t3.CharPositionInLine &&
> $t3.Line == $t4.Line &&
> $t3.CharPositionInLine + 1 == $t4.CharPositionInLine }?
> | ('>' '>' '=')=> t1='>' t2='>' t3='='
> { $t1.Line == $t2.Line &&
> $t1.CharPositionInLine + 1 == $t2.CharPositionInLine &&
> $t2.Line == $t3.Line &&
> $t2.CharPositionInLine + 1 == $t3.CharPositionInLine }?
> ;
>
> I do not see a 3 on the end of the predicates stuff the:
>
> throw new FailedPredicateException(input...
>
> I have synced with the latest depot.
>
> Ter
I wanted to update the maven install (mvn clean install) but I get the
error that
http://repo1.maven.org/maven2/org/antlr/gunit/1.0.5/gunit-1.0.5.jar
can't be found. :(
In any case, Ter, did you you try the CSharp2 version of the
composite-grammar, too? That way we can check, if this is just a local
problem.
Johannes
P.S.: I'm not off for bed for two hours or so. You Americans should get
your geography right. :P
> On Feb 21, 2009, at 3:24 AM, Johannes Luber wrote:
>
>> 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