Skip to content
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

Improving CPS. #48

Closed
modulovalue opened this issue Jul 28, 2023 · 1 comment
Closed

Improving CPS. #48

modulovalue opened this issue Jul 28, 2023 · 1 comment

Comments

@modulovalue
Copy link

Consider the following grammar (in grammophone syntax):

# The 'a' could be CPSd to make this grammar less inadequate.
S -> OPT1 a.

# The 'a' would be CPSd which would make this grammar less inadequate.
OPT1 -> OPT2 a.

OPT2 -> a.
OPT2 -> .

# CPSing both 'a's makes this grammar SLR(1), CPSing only the 'a' after 'OPT2' doesn't help much.

CPSing the OPT2, as the paper describes, because it is CPS-eligible, doesn't seem to help much with making the grammar adequate. Doing that and CPSing the a after OPT1 would make the grammar SLR(1).

This feels like an opportunity where the CPS approach can be improved, that is, maybe the CPS-eligibility definition could benefit from being loosened to include symbols that are not limited to fresh symbols created during the flattening procedure.

@modulovalue
Copy link
Author

Because langcc appears to be abandoned, I'm going to close this issue.

@modulovalue modulovalue closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant