-
Notifications
You must be signed in to change notification settings - Fork 84
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
Reduce the amount of CPP for attribute grammar support #257
Conversation
We previously had a lot of `#ifdef HAPPY_BOOTSTRAP` to support mangling with and without attribute grammar support. Now that module is broken up so that we need less. This hopefully makes the code easier to understand and maintain.
description: Optimize the implementation of happy using a pre-built happy | ||
description: | ||
Optimize the implementation of happy using a pre-built happy, | ||
and add support for attribute grammars. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should mention the other behavioral thing this flag does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have the flag the other way round, so it would then be "Build a version of happy for boot-strapping. The generated binary will not have support for attribute grammars."
See #256 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's going to be confusing either way because bootstrap
can be interpreted either as "bootstrapped" or "for bootstrapping", which are opposite in meaning.
Any ideas for a less ambiguous name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that is a preexisting issue; I am happy to change it but seems like it should be done separately. Does all the new things from this PR look good?
@@ -63,7 +65,7 @@ library | |||
other-modules: | |||
Happy.Frontend.ParseMonad | |||
Happy.Frontend.ParseMonad.Class | |||
Happy.Frontend.AttrGrammar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually already conditionally used, and should thus go below.
We previously had a lot of
#ifdef HAPPY_BOOTSTRAP
to support mangling with and without attribute grammar support. Now that module is broken up so that we need less.This hopefully makes the code easier to understand and maintain.