gpulost / lepl

Automatically exported from code.google.com/p/lepl
Other
0 stars 0 forks source link

Incorrect loop detection #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The detection of loops (and so the correct use of LMemo/RMemo) is broken in
3.2.  This is because the new cloning no longer gives special meaning to
Delayed instances, but the loop detection code still relied on the old
behaviour.

The workaround for now is to specify the following configuration instead of
the default value):

  Configuration(
    rewriters=[flatten, compose_transforms, lexer_rewriter(),
               optimize_or(True), memoize(LMemo)],
    monitors=[TraceResults(False)])

However, I would only suggest doing this if you have left-recursive grammar
and/or see the error:

  TypeError: 'NoneType' object is not iterable

Andrew

Original issue reported on code.google.com by acooke....@gmail.com on 6 Sep 2009 at 10:43

GoogleCodeExporter commented 9 years ago
Now fixed in hg.

Original comment by acooke....@gmail.com on 7 Sep 2009 at 12:18

GoogleCodeExporter commented 9 years ago

Original comment by acooke....@gmail.com on 9 Sep 2009 at 12:52