Treetop (like all PEGs) parses greedily, and does not backtrack on an
iterated rule.
In your case, this means that when parsing "<%@page", the "jspToken"
rule matches
first, then the following role jspPageToken fails because it's not
looking at "<%@page",
but at "page". The repetition of jspToken at the start of "document"
is not backtracked,
so the parser fails.
Clifford Heath.
> --
>
> You received this message because you are subscribed to the Google
> Groups "Treetop Development" group.
> To post to this group, send email to
treet...@googlegroups.com.
> To unsubscribe from this group, send email to
treetop-dev...@googlegroups.com
> .
> For more options, visit this group at
http://groups.google.com/group/treetop-dev?hl=en
> .
>
>