usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
400 stars 77 forks source link

Keyword with follow restrictions are ignored in a reject. #207

Open DavyLandman opened 11 years ago

DavyLandman commented 11 years ago

Example:

lexical A = [a-z]+ !>> [a-z];
keyword K = "int" !>> [a-z];
lexical Word = A \ K | K;
println(/amb(_) := parse(#Word, "int"));

prints: true, if you remove the follow restriction on K, it is filtered and thus returns false.

jurgenvinju commented 11 years ago

Let's leave this one until we merge Ali's parser. That parser can deal with follow restrictions and rejects of arbitrary complexity, including ones that have filters applied to themselves recursively.