Skip to content

Empty rules not handling correctly in LALR #1

@jdamen

Description

@jdamen

Describe the bug
I noticed that empty rules in the pck are not handled correctly in LALR

To Reproduce
Using following PCK content:
programs: start
whitespace: hidden

programs -> until_RUN RUN

until_RUN -> until_AT until_RUN
until_RUN -> until_AT
until_RUN ->
until_AT -> RT
until_AT -> ST

RUN= 'RUN'
RT= 'RT'
ST= 'ST'
whitespace= '[ \t\r\n\f\v]+'

It parses correctly using the following content:
RT
RUN

But it does not parse correctly with the this content:
RUN

while I think it should

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