On 15 Feb 2017, at 12:53 AM, Rob Nichols <
r...@nicholshayes.co.uk> wrote:
> How do I detect that an element is the last one?
Using a trick: You need to say, effectively "not anything":
rule end_of_input
! .
end
> For example, if I parse the text "one two three" how can I create a rule which pulls out "three" because it is the last in the list. I've tried using "\n" for end of line, but that fails I think because there is not carriage return in "one two three".
>
> --
> You received this message because you are subscribed to the Google Groups "Treetop Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
treetop-dev...@googlegroups.com.
> To post to this group, send email to
treet...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/treetop-dev.
> For more options, visit
https://groups.google.com/d/optout.