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

Ensure keyword rule only matches keywords #1001

Merged
merged 2 commits into from May 13, 2020

Conversation

philandstuff
Copy link
Collaborator

The keyword rule is provided for PEG (and similar) parsers to exclude
keywords from places like simple-label - and the simple-label rule
has an example above for how to do this.

However, keyword matches , which means that a naive use of the
keyword rule in simple-label would permit simple labels such as
∀bcde, which obviously should not be permitted.

This commit splits up the forall rule so that keyword can match the
forall keyword but not the forall symbol.

The `keyword` rule is provided for PEG (and similar) parsers to exclude
keywords from places like `simple-label` - and the `simple-label` rule
has an example above for how to do this.

However, `keyword` matches `∀`, which means that a naive use of the
`keyword` rule in `simple-label` would permit simple labels such as
`∀bcde`, which obviously should not be permitted.

This commit splits up the `forall` rule so that `keyword` can match the
forall keyword but not the forall symbol.
@philandstuff philandstuff merged commit 871e8f7 into master May 13, 2020
@philandstuff philandstuff deleted the philandstuff/keyword-rule branch May 13, 2020 13:16
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

Successfully merging this pull request may close these issues.

None yet

3 participants