[racket] parse-tools / lexer behavior
The results you're seeing are consistent with longest match;
"ILandroid" is longer than "I." The order of the [trigger action-expr]
pairs won't affect that. The order only affects which action is chosen
for an ambiguous match, but this case isn't ambiguous.
I don't think you can do what you're trying to do with only a (single)
lexer, unless there are some additional rules that aren't expressed in
your grammar (for example, "qualifiers cannot start with upper-case
letters").
On Fri, Jun 7, 2013 at 7:44 PM, David Weinstein <dweinst at insitusec.com> wrote:
> Can anyone explain the behavior that is observed here with the
> parser-tools/lexer. I think I'm overlooking something but both precedence
> and trying to make the longest match should be creating the expected
> behavior (please see comments in the .rkt). Thanks for your help!
>
>
> David
>
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>