[antlr-interest] ANTLRWorks interpreter doesn't understand syntactic predicates?
Elijah Epifanov
lists at xmart.ws
Sun Jun 3 11:50:48 PDT 2007
Hi, it looks like ANTLRWorks doesn't understand syntactic predicates, it
shows following tree
>>>>
<grammar nested>
|
--a
|
--FailedPredicateException(a,{synpred1}?)
<<<<
for the following grammar
>>>>
grammar nested;
a : (e ';' )=> e ';'
| e '.'
;
e : ('(' e ')' e)=> '(' e ')' e // type cast
| '(' e ')' // nested expression
| ID
;
ID :
'a'..'z' + ;
<<<<
when interpreting following text
>>>>
asas;
<<<<
starting at rule 'a'
Debugger works fine and shows the parse tree correctly (with one branch
with backtracking)
Is this a bug?
More information about the antlr-interest
mailing list