Hans,
I think I understand more or less what is going on there. However,
that seems
to imply I can't rely on testing for an optional symbol (such as
ExprTail) to
be nil, if I want to know if it was parsed or not?
Currently that is correct. I think that the behaviour that you
expected is certainly more useful and should be adopted.
Is there another way to see e.g. for
'x' xt:ExprTail?
whether just 'x' was parsed or rather e.g. 'x.id(3)'?
You can put actions anywhere, so one way would be to split the action
between the 'x' and the 'tail' part, like this:
rule = 'x' { action-for-x } ( xt:tail { action-for-tail-following-x } )?
| 'y' ...
(although you might then end up with redundancy in the second action).
Cheers,
Ian
_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc