I noticed the first time parse is OK.But when turning isFirst to false, this
kind of error message keep coming out.
I don't know why the failure of a predicate would lead to an error.
2008/12/3 chain one <[EMAIL PROTECTED]>
> And there are a lot of error tag in the final printed tree like this:
> (TYPE_DECL <error: temperature>
>
> Is it caused by the failure of the predicate?
>
>
> 2008/12/3 chain one <[EMAIL PROTECTED]>
>
> procedure_id
>> : { isFirst }? id=IDENT { addId($id.getText(),PROCEDURE_IDENT); }
>> | nid=PROCEDURE_IDENT { $nid.setType(IDENT);} ->
>> ^(PROCEDURE_ID[] PROCEDURE_IDENT)
>> ;
>> In the first pass, isFirst is true, and in the second pass, isFirst is
>> set to be false.
>> When running the generated Java code, it seems every time
>> the predicate fails, there will be an error message coming out like this:
>>
>> line 43:41 rule named_types failed predicate: { isFirst }?
>>
>> Could it be ignored? or there is something wrong with my grammar file?
>>
>>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address