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

Could rbg2p report an error if a variable in a rule is not previously defined? #3

Closed
HannaLindgren opened this issue Oct 22, 2019 · 3 comments

Comments

@HannaLindgren
Copy link
Member

I would like to get an error in the following case:

VAR CHARSET (a|b|c)
...
a -> A / _ HCARSET

where the variable is wrong.

@NikolajLindberg
Copy link
Member

Me too!

HannaLindgren added a commit that referenced this issue Dec 9, 2019
@HannaLindgren HannaLindgren reopened this Dec 9, 2019
@HannaLindgren HannaLindgren reopened this Dec 9, 2019
HannaLindgren added a commit that referenced this issue Dec 9, 2019
@HannaLindgren
Copy link
Member Author

It now fails if the context matches /[A-Z]{2,}/ OCH /^[A-Z0-9]{2,}$/. Not sure if this is right or not.

@HannaLindgren
Copy link
Member Author

It is not entirely easy to determine if a specified context is a variable or a regexp... It now fails if the context matches /^[A-Z]/ AND /^[A-Z0-9]{2,}$

Will close for now, but see also #5: Use of variables should always be surrounded by brackets

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

2 participants