-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Code Generator Generator #297
Comments
Hey, I think this is already covered by parser generation from grammar, right? |
hey, thanks for reply. what? how? |
I don't now much about these things, so pardon my possibly incorrect terminology. This package should be used in the future to generate |
@TomasVotruba PHP-Yacc is for generating parsers, I think this issue is more about generation of PHP code, though I'm not sure what exactly is being suggested. This library used to have support for templates, see https://github.com/nikic/PHP-Parser/blob/0.9/doc/4_Code_generation.markdown#templates. However, this was dropped in version 1.0 as the functionality was pretty limited and I don't think anyone was using it at the time. |
I see. Personally I prefer generating code directly by the builder. I have wrapper over it that suits more complex nodes and my personal needs. @mo-ba Have you any proof of concept in mind? |
hi guys! i will make some prototype, when i find some time, this should explain my suggesteion grtz |
How did you end up solving this @mo-ba ? |
Going to close this one as it's not really clear what is being asked. Worth noting that #566 links to a repo that can generate the code for constructing nodes from the AST. |
Yo DawG - I heard you like generators...
first: i love this lib!
since i saw this Issue, i thought about a generator to generate the generator via templates.
I think it should be possible parse a file, get the AST and then generate a generator script,using a GeneratorPrinter instead of the PrettyPrinter
this should make it easier to build generator scripts.
did someone try that?
Greetings
The text was updated successfully, but these errors were encountered: