Permissive grammars introduce ambiguities for literals
Example with the “module” keyword in Stratego-Sugar-Permissive:
amb([
appl(prod([char-class([109]),char-class([111]),char-class([100]),char-class([117]),char-class([108]),char-class([101])],lit(“module”),no-attrs),[109,111,100,117,108,101])
, appl(prod([lit(“module”)],lit(“module”),no-attrs),[appl(prod([char-class([109]),char-class([111]),char-class([100]),char-class([117]),char-class([108]),char-class([101])],lit(“module”),no-attrs),[109,111,100,117,108,101])])
])i.e., it seems to be parsed both using a production [\m][\o][\d][\u][\l][\e] and one for the literal “module.”
Right now, the asfix imploder filters these, but they should be filtered in an earlier stage for correctness and performance.
Submitted by Lennart Kats on 16 February 2010 at 15:59
Issue Log
A parse filtering work-around now addresses the generated ambiguities. A minor performance degradation related to this issue might still exist.
so issue can be closed I think.
Log in to post comments