Skip to content

possiblePathsFrom and recursion + missing grammar validation #45

@cdietrich

Description

@cdietrich

hi, first gratulations and thank you for this great project.
while exploring i found some problems i want you to know

trying to sketch a recursive expression grammar it looks like possiblePathsFrom might run into an infinite loop. do i overlook sth?

interface Expression {}

interface Add extends Expression {
    Left *Expression // stupid me
    Right *Expression
}

interface Mult extends Expression {
    Left *Expression
    Right *Expression
}

interface Literal extends Expression {
    value string
}

Addition returns Expression:
    Multiplication ({Add.Left=current} '+' Right=Multiplication)*
;

Multiplication returns Expression:
    Primary ({Mult.Left=current} '*' Right=Primary)*
;

Primary returns Expression:
    '(' Addition ')' | Literal
;

Literal returns Literal:
    value=INT
;

then i guess for the naming convention of Uppercase=Rule we need a validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions