@shexjs/parser
Version:
Shape Expressions Compact Syntax (ShExC) parser.
348 lines (337 loc) • 9.38 kB
text/xml
<shexDoc
xmlns="http://www.w3.org/2005/01/yacker/uploads/ShEx2Simple/"
xmlns:yacker="http://www.w3.org/2005/01/yacker/">
<!-- </S1> IRI {} AND {} -->
<shapeExprDecl>
<shapeExprLabel>
<iri>
<IRIREF></S1></IRIREF>
</iri>
</shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef>
<nonlitnodeconstraint>IRI</nonlitnodeconstraint>
<shapeOrRef>
<shapedefinition>{}</shapedefinition>
</shapeOrRef>
</shapeAtomNoRef>
<shapeOr>
AND
<shapeNot>
<shapeAtom>
<shapeOrRef>
<shapedefinition>{}</shapedefinition>
</shapeOrRef>
</shapeAtom>
</shapeNot>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
<!-- </S1> (IRI {}) AND {} -->
<notStartAction>
<shapeExprDecl>
<shapeExprLabel>/S1</shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef>
(
<shapeExpression>
<shapeAtomNoRef>
<nonLitNodeConstraint>IRI</nonLitNodeConstraint>
<shapeOrRef>
<shapeDefinition>{}</shapeDefinition>
</shapeOrRef>
</shapeAtomNoRef>
</shapeExpression>
)
</shapeAtomNoRef>
<shapeOr>
AND
<shapeNot>
<shapeAtom>
<shapeOrRef>
<shapeDefinition>{}</shapeDefinition>
</shapeOrRef>
</shapeAtom>
</shapeNot>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
</notStartAction>
<!-- </S1> IRI {} AND (IRI {}) AND IRI {} -->
<notStartAction>
<shapeExprDecl>
<shapeExprLabel>/S1</shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef/> => [IRI {}]
<shapeOr>
AND
<shapeNot>
<shapeAtom>
(
<shapeExpression>
<shapeAtomNoRef/> => [IRI {}]
</shapeExpression>
)
</shapeAtom>
</shapeNot>
AND
<shapeNot>
<shapeAtom/> => [IRI {}]
</shapeNot>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
</notStartAction>
<!-- </S1> IRI {} AND (IRI {}) OR IRI {} AND IRI {} OR (IRI {}) AND IRI {}
{ type: ShapeOr, shapeExprs: [
{ type: ShapeAnd, shapeExprs: [IRI, ., {type: ShapeAnd, shapeExprs: [IRI, .] }] },
{ type: ShapeAnd, shapeExprs: [IRI, ., IRI, .] },
{ type: ShapeAnd, shapeExprs: [{type: ShapeAnd, shapeExprs: [IRI, .] }, IRI, .] }
] }
-->
<notStartAction>
<shapeExprDecl>
<shapeExprLabel><iri>/S1</iri></shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef/> => [IRI, .]
<shapeOr>
AND
<shapeNot>
<shapeAtom>
(
<shapeExpression>
<shapeAtomNoRef/> => [IRI, .]
</shapeExpression>
)
</shapeAtom>
</shapeNot>
OR
<shapeAnd>
<shapeNot>
<shapeAtom/> => [IRI, .]
</shapeNot>
AND
<shapeNot>
<shapeAtom/> => [IRI, .]
</shapeNot>
</shapeAnd>
OR
<shapeAnd>
<shapeNot>
<shapeAtom>
(
<shapeExpression>
<shapeAtomNoRef/> => [IRI, .]
</shapeExpression>
)
</shapeAtom>
</shapeNot>
AND
<shapeNot>
<shapeAtom/> => [IRI, .]
</shapeNot>
</shapeAnd>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
</notStartAction>
<!-- </S1> IRI {} OR (IRI {}) AND (IRI {} OR IRI {}) AND ((IRI {}) OR IRI {})
{type: "ShapeOr", shapeExprs: [
{type: "ShapeAnd", shapeExprs: ["IRI", "."]},
{type: "ShapeAnd", shapeExprs: [
{type: "ShapeAnd", shapeExprs: ["IRI", "."]},
{type: "ShapeOr", shapeExprs: [
{type: "ShapeAnd", shapeExprs: ["IRI", "."]},
{type: "ShapeAnd", shapeExprs: ["IRI", "."]}
]},
{type: "ShapeOr", shapeExprs: [
{type: "ShapeAnd", shapeExprs: ["IRI", "."]},
{type: "ShapeAnd", shapeExprs: ["IRI", "."]}
]}
]}
]}
-->
<notStartAction>
<shapeExprDecl>
<shapeExprLabel><iri>/S1</iri></shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef/> => [IRI, .]
<shapeOr>
OR
<shapeAnd>
<shapeNot>
<shapeAtom>
LPAREN
<shapeExpression>
<shapeAtomNoRef/> => [IRI, .]
</shapeExpression>
RPAREN
</shapeAtom>
</shapeNot>
AND
<shapeNot>
<shapeAtom>
LPAREN
<shapeExpression>
<shapeAtomNoRef/> => [IRI, .]
<shapeOr>
OR
<shapeAnd>
<shapeNot>
<shapeAtom/> => [IRI, .]
</shapeNot>
</shapeAnd>
</shapeOr>
</shapeExpression>
RPAREN
</shapeAtom>
</shapeNot>
AND
<shapeNot>
<shapeAtom>
LPAREN
<shapeExpression>
<shapeAtomNoRef>
LPAREN
<shapeExpression>
<shapeAtomNoRef/> => [IRI, .]
</shapeExpression>
RPAREN
</shapeAtomNoRef>
<shapeOr>
OR
<shapeAnd>
<shapeNot>
<shapeAtom/> => [IRI, .]
</shapeNot>
</shapeAnd>
</shapeOr>
</shapeExpression>
RPAREN
</shapeAtom>
</shapeNot>
</shapeAnd>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
</notStartAction>
<!-- </S1> BNODE {} OR /^/ {} -->
<notStartAction>
<shapeExprDecl>
<shapeExprLabel>
<iri>/S1</iri>
</shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef>
<nonLitNodeConstraint>
<nonLiteralKind>BNODE</nonLiteralKind>
</nonLitNodeConstraint>
<shapeOrRef>
<shapeDefinition>{}</shapeDefinition>
</shapeOrRef>
</shapeAtomNoRef>
<shapeOr>
OR
<shapeAnd>
<shapeNot>
<shapeAtom>
<nonLitNodeConstraint>
<stringFacet>/^/</stringFacet>
</nonLitNodeConstraint>
<shapeOrRef>
<shapeDefinition>{}</shapeDefinition>
</shapeOrRef>
</shapeAtom>
</shapeNot>
</shapeAnd>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
</notStartAction>
<!-- </S1> {} AND IRI {} -->
<shapeExprDecl>
<shapeExprLabel>
<iri>
<IRIREF></S1></IRIREF>
</iri>
</shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef>
<shapedefinition>{}</shapedefinition>
</shapeAtomNoRef>
<shapeOr>
AND
<shapeNot>
<shapeAtom>
<nonlitnodeconstraint>IRI</nonlitnodeconstraint>
<shapeOrRef>
<shapedefinition>{}</shapedefinition>
</shapeOrRef>
</shapeAtom>
</shapeNot>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
<!-- (IRI {}) AND {} -->
<shapeExprDecl>
<shapeExprLabel>
<iri>
<IRIREF></S1></IRIREF>
</iri>
</shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef>
(
<shapeExpression>
<shapeAtomNoRef>
<nonlitnodeconstraint>IRI</nonlitnodeconstraint>
<shapeOrRef>
<shapedefinition>{}</shapedefinition>
</shapeOrRef>
</shapeAtomNoRef>
</shapeExpression>
)
</shapeAtomNoRef>
<shapeOr>
AND
<shapeNot>
<shapeAtom>
<shapeOrRef>
<shapedefinition>{}</shapedefinition>
</shapeOrRef>
</shapeAtom>
</shapeNot>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
<!-- </S1> {} AND (IRI {}) -->
<shapeExprDecl>
<shapeExprLabel>
<iri>
<IRIREF></S1></IRIREF>
</iri>
</shapeExprLabel>
<shapeExpression>
<shapeAtomNoRef>
<shapedefinition>{}</shapedefinition>
</shapeAtomNoRef>
<shapeOr>
AND
<shapeNot>
<shapeAtom>
(
<shapeExpression>
<shapeAtomNoRef>
<nonlitnodeconstraint>IRI</nonlitnodeconstraint>
<shapeOrRef>
<shapedefinition>{}</shapedefinition>
</shapeOrRef>
</shapeAtomNoRef>
</shapeExpression>
)
</shapeAtom>
</shapeNot>
</shapeOr>
</shapeExpression>
</shapeExprDecl>
</shexDoc>