-
Notifications
You must be signed in to change notification settings - Fork 2
Update README to correctly identify annotated_pattern as the generic syntactic element #3
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
Conversation
Co-authored-by: akollegger <[email protected]>
…nical form, path-like syntax as sugar Co-authored-by: akollegger <[email protected]>
akollegger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've introduced "subject pattern" as a term which is fine as the name for the specialization of the generic pattern structure.
In typescript, a pattern is:
type Pattern {
value:V
elements:Pattern[]
}
Gram is notation for patterns of subjects: Pattern
So "subject pattern" is fine for naming that type.
The gram grammar, though, does not have that type directly. Instead it supports two syntaxes for subject patterns:
- annotated patterns using square brackets to contain a subject and elements
- node & relationship patterns as syntactic sugar for graph-like patterns
Revise the readme to carefully distinguish between logical patterns and the syntactic forms.
Also, look through tests in the corpus to make sure the terminology is consistent
Co-authored-by: akollegger <[email protected]>
Revised in 807764d. The README now clearly distinguishes:
Reviewed test corpus - terminology is already consistent with grammar.js. |
|
Nope. Again look carefully and you will see that gram does not have a syntactic element called subject_pattern. I will give you a cookie if you can name the generic syntactic element. |
akollegger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try again subjects are content. There is no such thing as a subject_pattern in the grammar.
… and subjects as content Co-authored-by: akollegger <[email protected]>
Fixed in a7407b7. The generic syntactic element is The README now correctly:
Fixed in a7407b7. Subjects are now correctly described as content (identifier, labels, and/or properties), not pattern types. The generic syntactic element is |
akollegger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to do this
|
There is no longer any such thing as "bracket notation". Instead the generic annotated pattern notation uses brackets. |
README documentation needed to clarify the distinction between logical pattern types and the syntactic elements in the grammar, specifically identifying
annotated_patternas the generic syntactic element.Changes
Added "Patterns and Subjects" section explaining the logical data structure:
Pattern<V>- the generic pattern type with value and elementsPattern<Subject>- gram patterns where values are subjectsAdded "Annotated Patterns" section identifying the generic syntactic element:
annotated_pattern- the generic syntactic element in gram notation[ annotations | pattern_elements ]Added "Pattern Elements" section showing the three syntactic forms within annotated patterns:
[ subject | elements ]explicitly shows pattern structure( subject )parentheses as syntactic sugar for graph nodesAdded examples demonstrating the syntactic forms:
Existing tests (163) and SYNTAX_NOTES.md already use consistent terminology—no changes needed.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.