-
Notifications
You must be signed in to change notification settings - Fork 0
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
use records to store captured value instead of hashmap #2
Comments
kind of difficult without meta programming.. |
Is |
@ice1000 It cannot be a binop for F#. |
Discussed in #1 (seems that we've come up with the same idea! Time to get married) |
no... I found it difficult for the lack of metaprogramming infrastructures in F#. |
A feasible solution is, use discriminated union to represented all context type. bnf:
generated:
the parserc schema:
|
Why metaprogramming? Code generators never need metaprogramming, we can generate hard-coded stuffs. What are you concerning about? |
@ice1000 I don't want to say anything about this. Actually I have many to complain about code generation. However, without a definite and specific explanation you might not be satisfied. I don't really refuse this feature but until now there is no feasible design about it and I cannot implement it recently. Currently we need code generation from BNF to F#, which contains many important functionalities when visiting BNF AST:
If new features are added, I'm afraid that if we could implement it in a near future... |
to implement
And if we want to generate BNF into separate F# scripts we have to concern about stuffs related to .NET build system(which is not a trivial task)... So I suggest that we could firstly release a available version and persist adding more interesting features in the future. |
|
I found this prevent dynamic left recursion handling. |
We could create a type
A
to perform capturing:This might be much more efficient than current implementation.
The text was updated successfully, but these errors were encountered: