-
Notifications
You must be signed in to change notification settings - Fork 9
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
BNFC grammar vs natural4 grammar rules #602
Comments
@inariksit I think you are likely the best person to answer this question? |
My initial ambition was to adopt Haskell |
I believe we had some discussion on whether a GIVETH would make sense in a WHERE, and the results were inconclusive. GIVEN would make sense: this is the (very ad hoc) syntax I/we established for functions last spring, fully based on the PAU case.
Or in a table form, it looks like
|
Is |
Regarding the semantics of
Even though, it is possible to write this in two separate Rules, I think it makes sense to support this syntax. Especially, since we decided |
Yes, it is! The GML transpiler uses an expression parser inside the cells, but for other targets So in conclusion, should I amend the BNFC parser to accept full Rules in the WHERE clause? (In a way that doesn't break existing examples, of course.) |
For now, I believe so, yeah :) |
The recently added BNFC #591 parser for a fragment of natural4 has some seeming inconsistencies with the csv-based language.
This issue is for tracking these differences and discussing parts of the syntax and informal semantics.
One thing I found a bit confusing is the where clauses of a
Hornlike
rule. For example take:The
Hornlike
rule has awwhere :: [Rule]
field, but according to #591, theWHERE
part can only containRelationalPredicates
. Is this an intentional difference to natural4 or actually the status-quo of how the natural4 parser works right now?Note, I am omitting (ignoring) a discussion from the 25.7.2024 where it sounded like
WHERE
should mirror Haskell'swhere
, allowing the declaration and definition of arbitrary rules.The text was updated successfully, but these errors were encountered: