Repository navigation
Commit 0efeba2
+ ShEx 2.1: new ShExC parser, ShExJ-shaped AST, spec validator
Replace the ShEx1-era .ssx parser and RulePattern AST with a ShEx 2.1
implementation that passes all 1729 applicable shexSpec/shexTest cases
(schemas, negativeSyntax, negativeStructure and validation manifests,
including the EXTENDS/ABSTRACT hierarchy tests).
Parser: lib/ShExCParser.ypp ports the productions of shex.js's
ShExJison.jison (the reference ShExC grammar) to this repo's bison
conventions; the scanner gains REGEXP, REPEAT_RANGE, CODE, ATPNAME and
LANG_STRING tokens plus /* */ comments. Conflict-free LALR.
AST + validation: lib/ShExSchema.{hpp,cpp} mirror ShExJ (shape
expressions, triple expressions, node constraint components, value
sets with stems/ranges/exclusions). The validator follows jena-shex:
predicate-based pre-matching, eager recursive valueExpr filtering,
iteration over matchings accepted by interval computation on the SORBE
form of each triple expression, CLOSED/EXTRA handling, cyclic-schema
assumptions, and EXTENDS splits with supertype constraint checks.
Structure checks enforce defined references, triple-constraint-crossing
cycles, no negation (or EXTRA'd constraint) in reference cycles, and
shape/tripleExpr label separation.
Semantic actions: the http://shex.io/extensions/Test/ language is
interpreted (its fail(...) aborts); other languages are no-ops.
tests/test_ShEx.cpp walks the shexTest manifests (fetched by
tests/fetch-test-suites.sh) and registers each entry as a test case,
mapping the suite's web URLs to the local checkout and resolving
focus/shape blank nodes by source label. test_ShEx moves into CI's
blocking bucket.
AtomFactory now preserves the lexical form of xsd:boolean literals and
interns them by it ("TRUE"^^xsd:boolean is not "true"^^xsd:boolean),
which the ShEx ValidLexicalForm tests require.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent edc063a commit 0efeba2
20 files changed
Lines changed: 3701 additions & 1865 deletions
File tree
- .github/workflows
- lib
- tests
- ShEx
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2240 | 2240 | | |
2241 | 2241 | | |
2242 | 2242 | | |
2243 | | - | |
2244 | | - | |
2245 | | - | |
2246 | | - | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
2251 | | - | |
2252 | | - | |
2253 | | - | |
2254 | | - | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
2255 | 2246 | | |
2256 | 2247 | | |
2257 | 2248 | | |
| |||
2496 | 2487 | | |
2497 | 2488 | | |
2498 | 2489 | | |
2499 | | - | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
2500 | 2493 | | |
2501 | 2494 | | |
2502 | 2495 | | |
| |||
This file was deleted.
0 commit comments