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

Editing ASP grammar to permit _ in object constants and predicate sym… #66

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

ZachJHansen
Copy link
Collaborator

@ZachJHansen ZachJHansen commented Feb 22, 2024

…bols.

The FOL grammar defines symbolic constants as

symbolic_constant = @{ !keyword ~ ""? ~ ASCII_ALPHA_LOWER ~ (ASCII_ALPHANUMERIC | "")* }

whereas the ASP grammar (prior to this update) defined them as

symbol = @{ !negation ~ ASCII_ALPHA_LOWER ~ ASCII_ALPHANUMERIC* }

which seems to be an oversight.

Closes #62

@teiesti
Copy link
Collaborator

teiesti commented Feb 23, 2024

Unfortunately, this change doesn't seem to be sufficient to remove all of the inconsistency as the FOL grammar allows _a while your change to the ASP grammar does not allow that.

@teiesti teiesti self-requested a review February 23, 2024 09:21
src/parsing/asp/grammar.pest Outdated Show resolved Hide resolved
@teiesti teiesti added E-easy Experience: Easy C-feature-requested Category: Requested feature A-parsing Area: Parsing L-asp Language: Answer Set Programming labels Feb 23, 2024
@teiesti teiesti merged commit 52b8a2c into master Feb 23, 2024
4 checks passed
@teiesti teiesti deleted the zach/underscore branch February 23, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parsing Area: Parsing C-feature-requested Category: Requested feature E-easy Experience: Easy L-asp Language: Answer Set Programming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support predicate names with underscores?
2 participants