]> hydra-www.ietfng.org Git - dyna2/commit
Fix "longest-match" requirement on operators
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Wed, 10 Jul 2013 19:27:44 +0000 (15:27 -0400)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Wed, 10 Jul 2013 19:39:34 +0000 (15:39 -0400)
commitddb104238deedd498b667ada0bf09273d79f24a7
tree4b4ec835318ced5ff39c70cc4a652a294fcf9a83
parent2ed71d7a00b25875b5e8b2bf9abc1fc1391131e7
Fix "longest-match" requirement on operators

We were running a token parser before the "notFollowedBy", which is clearly
wrong.  Now, tokenize a strict string then notFollowedBy.  This will require
that users write things like "... <oper> -<expr>" even though "<oper><expr>"
is accepted and "-<expr>" is an <expr>.

While here, add an explicit regression test for this bug.

This closes nwf/dyna#45 .
src/Dyna/ParserHS/Parser.hs
src/Dyna/ParserHS/Selftest.hs