-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty rules not handling correctly in LALR #1
Comments
I'll look into it, but LALR(1) support has always been a bit a dodgy in
PCK. To be honest I don't know how to do it so I can't promise a fix
…On Mon, Jan 27, 2020 at 1:40 PM Johan Damen ***@***.***> wrote:
*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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AD5ICVJ53PZWIIPJN4QOWRDQ75IGTA5CNFSM4KMISDT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IJBTHXA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5ICVO67GFKFLSDKGRYA33Q75IGTANCNFSM4KMISDTQ>
.
|
Adding, you might have better luck with Parsley anyway.
https://www.codeproject.com/Articles/5255746/Parse-Anything-Advanced-Parsley-Part-2
Unlike a LALR(1) parser you can override the parse if you have to so you
can cajole it into parsing things like C# if you don't mind hand writing
part of it.
…On Mon, Jan 27, 2020 at 1:40 PM Johan Damen ***@***.***> wrote:
*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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AD5ICVJ53PZWIIPJN4QOWRDQ75IGTA5CNFSM4KMISDT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IJBTHXA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5ICVO67GFKFLSDKGRYA33Q75IGTANCNFSM4KMISDTQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: