Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Code Generator rule "alias" generates stack overflow/error. #11

Description

@LesBarstow

When a rule is simply equal to another rule, the generated rule returns itself instead of the other rule.

rule-a = ALPHA / DIGIT
rule-b = rule-a
// rule-a = ALPHA / DIGIT
func RuleA() operators.Operator {
    return operators.Alts(
        "rule-a",
        core.ALPHA(),
        core.DIGIT(),
    )
}
// rule-b = rule-a
func RuleB() operators.Operator {
    return RuleB()  // NOTE - ERROR HERE - should be RuleA
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions