If I'm understanding things correctly, the lexgen egg's lex procedure is (at least in some cases) matching based of the order of specification (match the first possible thing), not on longest possible match. Can this be right? The documentation says

"lex takes a pattern and a string, turns the string into a list of streams (containing one stream), applies the pattern, and returns the longest match."

I placed an example of what I mean at http://paste.call-cc.org/paste?id=8196b316bf50c18bb044870f95bbbebb00e5026d . Here, testpat1 will match "..." as one "." followed by an untokenizable remainder, whereas testpat2 will match "..." correctly in its entirety.

Sam Hardwick

_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to