Skip to content
This repository was archived by the owner on Jun 24, 2020. It is now read-only.
This repository was archived by the owner on Jun 24, 2020. It is now read-only.

Recursive rules #14

@sliekens

Description

@sliekens

It's not possible right now to construct a rule that references itself.

grouping = "(" *(ALPHA / grouping) ")"
         ; matches ()
         ; matches (abc)
         ; matches (abc())
         ; matches (abc(abc))
         ; etc.

The reason is that, for this example, the GroupingLexer must be materialized before it can be added to its own list of lexer rules. This is not supported right now because of an oversight.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions