Skip to content

meaning of "Production 'xxx' is not reachable"? #108

@nobodxbodon

Description

@nobodxbodon

Take the test case for example:

def test_unused_production(self):

Below are three cases with changed unused production rule:

case 1 -- No Warning

        @pg.production("main : VALUE")
        def main(p):
            return p[0]

        @pg.production("unused : main") 
        def unused(p):
            pass

case 2 -- Show Warning

        @pg.production("main : VALUE")
        def main(p):
            return p[0]

        @pg.production("unused : OTHER main")
        def unused(p):
            pass

case 3 -- No Warning

        @pg.production("main : VALUE")
        def main(p):
            return p[0]

        @pg.production("unused : VALUE main")
        def unused(p):
            pass

Now I'm quite puzzled about the meaning of this warning.

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