-
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
stabilize order of properties in grammars #76
Comments
You've honestly covered pretty much everything. Will think about what else may be useful to add... |
I think we should specify the intersection order, this is what you seem to be doing: Intersection of two sets of properties P1 and P2 is P1 + (P2 \ P1) (the order of P1 is maintained and remaining properties from P2 are added at the end in order of P2). The sibling keys are always processed first (as P1). Then elements of AllOf are processed in order. On reflection, this seems the only reasonable option (one could argue siblings could go at the end, but I think front makes more sense). |
This aligns with my mental model, yes! A few additions:
I think the set precedence vs "in order of appearance" decision is the one big thing I would like to make an intentional decision on before calling this "stabilized". |
I like "in order of appearance", even if that makes the sibling keys impl a bit more difficult. |
I think I agree. Stabilizing this feels relatively high priority, so I'll start drafting something |
I got started at https://github.com/microsoft/llguidance/blob/main/parser/src/json/README.md
@hudson-ai please check and beef it up!
The text was updated successfully, but these errors were encountered: