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

Add support for arbitrary rule metadata. #57

Closed
igordejanovic opened this issue Aug 20, 2018 · 1 comment
Closed

Add support for arbitrary rule metadata. #57

igordejanovic opened this issue Aug 20, 2018 · 1 comment
Assignees
Labels

Comments

@igordejanovic
Copy link
Owner

igordejanovic commented Aug 20, 2018

This could be used in recognizers, actions, disambituation/error recovery callbacks, error reporting etc. to extend the semantics of parglare grammar language.

Ideas for the syntax (label is meta-data attached to my_rule grammar rule):

<label: "My Rule">
my_rule: ... ;

or just extending currently build-in meta-data in {}:

my_rule: ... {label:"My Rule"};

Once defined it could be accessed on grammar symbol as an attribute for example.

I like more the later syntax approach as it wouldn't introduce additional syntax noise and with #17 it would enable defining meta-data per productions also without change in syntax.

@igordejanovic
Copy link
Owner Author

igordejanovic commented Aug 29, 2018

Done on master branch.

Syntax is different from the initially proposed. Please see the docs.

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

No branches or pull requests

1 participant