Skip to content

Cryptic error on rules without "tail" method #95

@bannmann

Description

@bannmann

Due to sloppy editing, at one point I ended up with an AG whose structure looked as shown below (except that the rule ended after the *). I was confused because I could not see a "conflict" anywhere, then figured out what the cause was.

// fails with the following error:
// Conflict: String#L12C5, secondA()#L15C9, secondB()#L17C9
//
// fix:
// replace "//third()" with "third()"
//
// ideas for helpful messages:
// - line 21:4 rule must have non-repeatable tail method so it can return String#L16C5
//          ^-- points to the semicolon ending the rule
//
Foo {
    String
    first()
    (
        secondA()
        |
        secondB()
    )
    *
    //third()
    ;
}

I guess if the error message had said something about what I would (informally?) call a "tail" method, I'd have understood immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions