Previous: , Up: Deprecated techniques and methods   [Contents][Index]


32.3 Cycles

A cycle is a case in a grammar where a string non-trvially derives itself. Marpa will parse grammars with cycles, but this is deprecated. Applications should treat cycles as mistakes on the part of the writer of the grammar, and not attempt to parse with grammars that contain cycles.

If Marpa is used to parse an input that causes a cycle, it will limit the cycle to a single loop, so that only a finite number of parse trees is returned. Again, parsing with cycles is deprecated.

For more on cycles, see