Skip to content
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

Group names inside rules sometimes don't work as expected #8

Open
ksmolyanin opened this issue Jul 28, 2011 · 0 comments
Open

Group names inside rules sometimes don't work as expected #8

ksmolyanin opened this issue Jul 28, 2011 · 0 comments

Comments

@ksmolyanin
Copy link

Group names inside rules sometimes don't work as expected because they do not share params with other parts of the rule. Example:
unknown_attribute: name:simple_name pws ":" pws value:(expression | identifier) function name (&$res, $sub) { $res['content'][] = '"'; $res['content'][] = $sub['text']; } function value (&$res, $sub) { //$res['content'][] = $sub['text']; // <-- thist works good, but I don't need it $res['content'][] = $sub['content']; // <-- this doesn't work because it doesn't know what is $sub['content'] }
There is workaround:
unknown_attribute: name:simple_name pws ":" pws (value:expression | value:identifier) function name (&$res, $sub) { $res['content'][] = '"'; $res['content'][] = $sub['text']; } function value (&$res, $sub) { $res['content'][] = $sub['content']; }
Pay attention to "value:" name in both examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant