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

Should one be able to specify PLCC in PLCC? #57

Open
StoneyJackson opened this issue Oct 6, 2023 · 0 comments
Open

Should one be able to specify PLCC in PLCC? #57

StoneyJackson opened this issue Oct 6, 2023 · 0 comments

Comments

@StoneyJackson
Copy link
Member

I think we have all tried to specify PLCC in PLCC, and have become stuck, and have come to the conclusion that PLCC currently does not support this. This opens the question, should one be able to specify PLCC in PLCC?

Here are the reasons that I can think of:

  1. This would allow others to build tools for PLCC grammar files without altering PLCC itself (e.g., syntax highlighters, linters, static analyzers, etc.).
  2. It would provide another example of the PLCC grammar itself.
  3. We should follow the principle of "dogfooding". If we believe in our dogfood, we should eat it ourselves.
  4. It just feels right and somehow more elegant.

Admittedly, some of these are weak; especially the last two. Usually I'm big on dogfooding; but PLCC is not designed as a general purpose compiler-compiler, so it does not necessarily need to be able to generate a parser for its own grammar files. And the "feels right" argument... well, it still feels right. :)


We should probably consider the implications of adopting this as a goal. If we do end up adopting this goal, then we have to figure out how to get there. We can either redefine the grammar syntax so that it fits within the capabilities of PLCC, or we can expand the capabilities of PLCC. The former would break existing code, so the later is probably preferred even if it adds complexity.

There has been some discussion in email as to what would be needed to make this possible. We should probably discuss them more openly in separate issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant