-
Notifications
You must be signed in to change notification settings - Fork 571
FOR COMMENT ONLY Skel backends #710
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
base: master
Are you sure you want to change the base?
Conversation
Add backend enumeration. Reorganize backend lookup code around backend stack.
It was unused.
TODO: found a timing issue where parse emits actions using the default backend before the language is set. Either need to provide a delayed action emitter or initialize the backend stack earlier.
|
I see that go has good standard and third party tooling for generating scanners, so please submit a pr to drop the go stuff as its own pr. |
|
tests/array_nr: Please submit this as its own pr. |
|
BUILT_SOURCES.: That'll teach me to go counter to what the automake manual recommends... I'm looking forward to that pr as well. |
We want that anyway, regardless of the work on this particular pr. |
The automake manual isn't very clear on what this variable does anyway. They should add an alias SYNCHRONIZE_ON_SOURCES for it to use in new code. |
|
Sorry the breakout PRs are taking so long. Really dug a hole for myself with the side projects. I do want to eat some humble pie tonight. Looks like @Explorer09 and others have been right about how the Automake/Libtool folks mean for us to resolve build order and bootstrapping challenges. They've been updating their docs to make their opinion clearer and maybe hint at their plans. So I'm going to back off my position that BUILT_SOURCES is good or useful. There's still a concurrency-related error message but I'll for an issue and help solve it another way. I'll add a note here when I do. Happy New Year, everyone! |
I've lost the context of why you are using BUILT_SOURCES to fix the build problems. I remember that almost a year go I've ditched BUILT_SOURCES in favor of explicit dependencies mentioned in the makefile. The problem with BUILT_SOURCES was that, it was activated in every build target, even for partial builds like building If you happen to use BUILT_SOURCES for "synchronization" then it still means something wrong with the build dependency tracking. I chose to ultimately remove the use of BUILT_SOURCES for this reason.
Happy new year, by the way. |
| const int CPP_BACKEND_MAX_INDENT = 256; | ||
|
|
||
| const char *cpp_skel[] = { | ||
| #include "cpp-flex.h" |
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.
Try adding this line in src/Makefile.am to fix the dependency problem:
cpp-backend.$(OBJEXT): cpp-flex.hThat way you won't need BUILT_SOURCES for the job.
I have a backend code emission system working and ready for comment. I'll need to write a filter to replace M4 in our stack to use it directly the in skeletons, but I have an idea for how to build that from our buffer library.
I need eyes on this for now to help me see where I've gone blind from staring at it too long. What do your linters say?
Issues that came up along the way and I'll split out for the real PR:
Yes, structs of function pointers are hideous backdoor OOP. I used them as the least bad option I now. I'm open to learning better patterns.
Thanks all!