rule request
'abc' / 'abcd'
end
I've discovered that I must use:
rule request
'abcd' / 'abc'
end
This is: the longest match first.
Please, any reason for this? is it pointed somewhere in the doc?
Thanks a lot.
--
Iñaki Baz Castillo
<i...@aliax.net>
Taken from treetop website:
Parsers attempt to match ordered choices in left-to-right order, and
stop after the first successful match.
"foobar" / "foo" / "bar"
Note that if "foo" in the above expression came first, "foobar" would
never be matched.
cheers
Martin
Opss, nice point. Thanks a lot, it's clear now.