-
Notifications
You must be signed in to change notification settings - Fork 55
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
Do not suppress rules with one child sequences #24
Comments
Current workaround is to do visitor job in some of the calling rules. def visit_data(self, node, children):
return [float(x) for x in children] |
@igordejanovic This is also causing problems for me. Do you plan on fixing it? |
Of course. But can't tell when I'll have time to do it. if you have time and this issue is hurting you maybe you could try? It shouldn't be very hard. I'll be glad to review PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For grammars that have rules with one-child sequence (i.e. delegating to other rules) an optimisation measure will suppress those node from the parser model.
This causes problems in semantic analysis as the visitors will not get called.
Here
_min, q1, med...
rules are delegating tonumber
rule.If we now write visitor method:
If will not get called as the
number
node from the parser model is suppressed.This optimisation measure should be controlled with a parser param.
The text was updated successfully, but these errors were encountered: