diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit index eb1ead0..bee0ec0 100755 --- a/git-hooks/pre-commit +++ b/git-hooks/pre-commit @@ -6,8 +6,9 @@ exec 1>&2 # Ensure that various copies of schema.prs are in fact identical. cmp schema/schema.prs implementations/racket/preserves/preserves-schema/schema.prs -# Likewise schema.bin +# Likewise schema.bin and path.bin cmp schema/schema.bin implementations/python/preserves/schema.prb +cmp path/path.bin implementations/python/preserves/path.prb # Likewise for samples.pr cmp tests/samples.pr implementations/racket/preserves/preserves/tests/samples.pr diff --git a/implementations/python/preserves/path.prb b/implementations/python/preserves/path.prb new file mode 100644 index 0000000..ca12e84 --- /dev/null +++ b/implementations/python/preserves/path.prb @@ -0,0 +1,7 @@ +´³schema·³version‘³ definitions·³Axis´³orµµ±values´³rec´³lit³values„´³tupleµ„„„„µ± descendants´³rec´³lit³ descendants„´³tupleµ„„„„µ±at´³rec´³lit³at„´³tupleµ´³named³key³any„„„„„µ±label´³rec´³lit³label„´³tupleµ„„„„µ±keys´³rec´³lit³keys„´³tupleµ„„„„µ±length´³rec´³lit³length„´³tupleµ„„„„µ± annotations´³rec´³lit³ annotations„´³tupleµ„„„„µ±embedded´³rec´³lit³embedded„´³tupleµ„„„„µ±parse´³rec´³lit³parse„´³tupleµ´³named³module´³seqof´³atom³Symbol„„„´³named³name´³atom³Symbol„„„„„„µ±unparse´³rec´³lit³unparse„´³tupleµ´³named³module´³seqof´³atom³Symbol„„„´³named³name´³atom³Symbol„„„„„„„„³Step´³orµµ±Axis´³refµ„³Axis„„µ±Filter´³refµ„³Filter„„„„³Filter´³orµµ±nop´³rec´³lit³nop„´³tupleµ„„„„µ±compare´³rec´³lit³compare„´³tupleµ´³named³op´³refµ„³ +Comparison„„´³named³literal³any„„„„„µ±regex´³rec´³lit³regex„´³tupleµ´³named³regex´³atom³String„„„„„„µ±test´³rec´³lit³test„´³tupleµ´³named³pred´³refµ„³ Predicate„„„„„„µ±real´³rec´³lit³real„´³tupleµ„„„„µ±int´³rec´³lit³int„´³tupleµ„„„„µ±kind´³rec´³lit³kind„´³tupleµ´³named³kind´³refµ„³ ValueKind„„„„„„„„³Selector´³seqof´³refµ„³Step„„³ Predicate´³orµµ±Selector´³refµ„³Selector„„µ±not´³rec´³lit³not„´³tupleµ´³named³pred´³refµ„³ Predicate„„„„„„µ±or´³rec´³lit³or„´³tupleµ´³named³preds´³seqof´³refµ„³ Predicate„„„„„„„µ±and´³rec´³lit³and„´³tupleµ´³named³preds´³seqof´³refµ„³ Predicate„„„„„„„„„³ ValueKind´³orµµ±Boolean´³lit³Boolean„„µ±Float´³lit³Float„„µ±Double´³lit³Double„„µ± SignedInteger´³lit³ SignedInteger„„µ±String´³lit³String„„µ± +ByteString´³lit³ +ByteString„„µ±Symbol´³lit³Symbol„„µ±Record´³lit³Record„„µ±Sequence´³lit³Sequence„„µ±Set´³lit³Set„„µ± +Dictionary´³lit³ +Dictionary„„µ±Embedded´³lit³Embedded„„„„³ +Comparison´³orµµ±eq´³lit³eq„„µ±ne´³lit³ne„„µ±lt´³lit³lt„„µ±ge´³lit³ge„„µ±gt´³lit³gt„„µ±le´³lit³le„„„„„³ embeddedType€„„ \ No newline at end of file diff --git a/implementations/python/preserves/path.py b/implementations/python/preserves/path.py index cd30a8d..75a884e 100644 --- a/implementations/python/preserves/path.py +++ b/implementations/python/preserves/path.py @@ -5,7 +5,7 @@ from .compat import basestring_ import pathlib import re -syntax = load_schema_file(pathlib.Path(__file__).parent / '../../../path/path.bin').path +syntax = load_schema_file(pathlib.Path(__file__).parent / 'path.prb').path Selector = syntax.Selector Predicate = syntax.Predicate