-
Notifications
You must be signed in to change notification settings - Fork 7
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
Port guidance's JSON implementation #48
Merged
Merged
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
09d8d59
implement schema JSON -> llgrammar JSON
hudson-ai 78ccc30
Return GrammarWithLexer instead of TopLevelGrammar
hudson-ai b30d5e8
refactor json into mod
hudson-ai 5f836ae
default to all types if type unspecified
hudson-ai e67ed0f
basic formats
hudson-ai 261d27e
format parity
hudson-ai 4d89e81
initial port of numeric ranges
hudson-ai 9d58157
fix right inclusivity
hudson-ai c777deb
fix integer bounds from floats
hudson-ai 1c6be00
more fixes for ints
hudson-ai a85000f
whitespace_flexible and separators
hudson-ai ba817e4
whitespace flexible consts and enums
hudson-ai 8bbd244
required
hudson-ai 6f1c35e
Merge branch 'main' into json_extension
hudson-ai f85598a
types is wonky
hudson-ai 9aa5db5
substring (may pull out into separate PR)
hudson-ai 49d2ca6
drop non-test
hudson-ai 729425f
clean up
hudson-ai 46bad35
null test
hudson-ai a898bf3
impl Default for JsonCompileOptions
hudson-ai 49b8b6b
taken names
hudson-ai d576962
type inference
hudson-ai 5b924aa
json_dumps
hudson-ai e8eb74a
cache recursive calls of ordered_sequence
hudson-ai f648ebe
check number bounds
hudson-ai b2fc186
a few UnsatisfiableSchemaError propagation cases
hudson-ai faa6162
ignore unsatisfiable schemas in anyOf
hudson-ai aeff512
remove substring.rs (for separate PR)
hudson-ai a3b0912
type inference
hudson-ai ce89057
drop todo
hudson-ai b94a085
normalize
hudson-ai ef6c066
filter
hudson-ai e462084
silence for now
hudson-ai 6c694ad
start cleaning up a bit
hudson-ai 7f2a74e
delete code!
hudson-ai 42f526d
testish
hudson-ai 0279fc5
normalize in try_from
hudson-ai 64607e4
fmt normalize
hudson-ai cf3fe91
fix merged prefixItems by applying other schema's items
hudson-ai 80f9ead
required as IndexSet
hudson-ai bdd7b46
refactor and flesh out try_type
hudson-ai 91e9a6c
fix merge in case that a schema is unsat
hudson-ai 3c38375
simple ref without siblings
hudson-ai e3ef006
use referencing
hudson-ai fa080a8
abspath
hudson-ai b7af4f3
attempt at recursive refs
hudson-ai 063d0a1
simplify refs
hudson-ai c8bc68a
explicit default root uri
hudson-ai e0f5832
comment
hudson-ai 87203f9
allow sibling keys on refs as long as they aren't too recursive
hudson-ai 6f0d336
from bool
hudson-ai 32b1cc0
use schema.rs
hudson-ai fb8744e
cargo fmt
hudson-ai 1c89413
comment out block for a minute
hudson-ai 66df303
fix defs
hudson-ai ea3a395
fix optional items
hudson-ai 6e09951
validate enums and consts
hudson-ai 6421707
check keyword validity
hudson-ai f050eba
cargo fmt
hudson-ai 0e971cc
make @mmoskal less sad
hudson-ai be74d89
rename merge -> intersect and have it take ownership
hudson-ai 31c3ba0
mark seen
hudson-ai ee592b0
make normalize shallow so we don't recursively re-normalize schemas t…
hudson-ai fd2e166
fix all but the most degenerate refs-with-sibling-keys
hudson-ai 86c2bf3
cargo fmt
hudson-ai 2aa4d87
encapsulate shared context
hudson-ai 63507a9
rough limit on total schema size
hudson-ai 5a884e5
fix sample_parser JsonCompileOptions
hudson-ai d822980
Merge branch 'main' into json_extension
hudson-ai a3a1847
take Value as value
hudson-ai 6b9762f
use shallow clone
mmoskal 6249e2c
Merge branch 'json_extension' of https://github.com/hudson-ai/llguida…
mmoskal 6cbfa13
anyhow-ify numeric regex builders
hudson-ai 20004c3
cargo fmt
hudson-ai ba50642
depend on jsonschema_validation feature
hudson-ai adac6bc
remove non-tests
hudson-ai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
at some point, you will probably want
Rc<RefCell<InnerContext>>
(probably when adding normalize counters)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.
Oh thanks, I'll look into it. Was just about to start adding said counters to track the number of Schema nodes that are being constructed. Probably not to normalize itself though, as I just made that "shallow".