@faubulous/mentor-rdf-parsers
    Preparing search index...

    Class SparqlParser

    A SPARQL 1.2 compliant parser. Based on the SPARQL 1.2 grammar: https://www.w3.org/TR/sparql12-query/#sparqlGrammar

    Hierarchy

    • CstParser
      • SparqlParser

    Implements

    Index

    Constructors

    Properties

    _insideDeleteBlock _verbIsSimplePath add additiveExpression aggregate annotation annotationBlock annotationBlockPath annotationPath anon argList askQuery baseDecl bind blankNode blankNodePropertyList blankNodePropertyListPath booleanLiteral brackettedExpression builtInCall builtInCallDateTimeFuncs builtInCallHashFuncs builtInCallMiscFuncs builtInCallNumericFuncs builtInCallRdf12Funcs builtInCallStringFuncs builtInCallStringFuncs2 builtInCallStringFuncs3 builtInCallTermAccessors builtInCallTestFuncs clear collection collectionPath conditionalAndExpression conditionalOrExpression constraint constructQuery constructTemplate constructTriples copy create dataBlock dataBlockValue datasetClause defaultGraphClause deleteClause deleteData deleteWhere describeQuery drop errors existsFunc expression expressionList exprTripleTerm exprTripleTermObject exprTripleTermSubject filter functionCall graphGraphPattern graphNode graphNodePath graphObject graphOrDefault graphPatternNotTriples graphRef graphRefAll graphTerm groupClause groupCondition groupGraphPattern groupGraphPatternSub groupOrUnionGraphPattern havingClause havingCondition inlineData inlineDataFull inlineDataOneVar insertClause insertData iri iriOrFunction limitClause limitOffsetClauses literal load minusGraphPattern modify move multiplicativeExpression namedGraphClause namespaces notExistsFunc numericExpression numericLiteral numericLiteralNegative numericLiteralPositive numericLiteralUnsigned objectList objectListPath objectPath offsetClause optionalGraphPattern orderClause orderCondition path pathAlternative pathElt pathEltOrInverse pathMod pathNegatedPropertySet pathOneInPropertySet pathPrimary pathSequence prefixDecl prefixedName primaryExpression prologue propertyList propertyListNotEmpty propertyListPath propertyListPathNotEmpty quadData quadPattern quads quadsNotTriples query queryBody queryOrUpdate rdfLiteral RECORDING_PHASE regexExpression reifiedTriple reifiedTripleBlock reifiedTripleBlockPath reifiedTripleObject reifiedTripleObjectPath reifiedTriplePath reifiedTriplePathBlock reifiedTripleSubject reifier relationalExpression selectClause selectQuery semanticErrors serviceGraphPattern solutionModifier sourceSelector string strReplaceExpression subSelect substringExpression triplesBlock triplesNode triplesNodePath triplesSameSubject triplesSameSubjectPath triplesTemplate tripleTerm tripleTermData tripleTermDataObject tripleTermDataSubject tripleTermObject tripleTermSubject unaryExpression update update1 updateBody usingClause valueLogical valuesClause var varOrIri varOrReifierId varOrTerm verb verbPath verbSimple versionDecl versionSpecifier whereClause

    Accessors

    Methods

    Constructors

    Properties

    _insideDeleteBlock: boolean = false

    Tracks whether we are inside a DELETE block (DELETE DATA, DELETE WHERE, or DeleteClause). Per grammar note 7, blank node syntax is not allowed in these contexts, which means anonymous reifiers and annotation blocks without a named reifier are disallowed.

    _verbIsSimplePath: boolean = true

    Tracks whether the current verb in a PropertyListPathNotEmpty is a simple path (IRI or 'a') vs a complex property path expression. Per spec note 16, annotations and reifiers are only permitted when the verb is a simple path.

    add: ParserMethod<[], CstNode> = ...

    [37] Add ::= 'ADD' 'SILENT'? GraphOrDefault 'TO' GraphOrDefault

    additiveExpression: ParserMethod<[], CstNode> = ...

    [125] AdditiveExpression ::= MultiplicativeExpression ('+' MultiplicativeExpression | '-' MultiplicativeExpression | (NumericLiteralPositive | NumericLiteralNegative) (('' UnaryExpression) | ('/' UnaryExpression))?)

    aggregate: ParserMethod<[], CstNode> = ...

    [137] Aggregate ::= 'COUNT' '(' 'DISTINCT'? ('*' | Expression) ')' | 'SUM' '(' 'DISTINCT'? Expression ')' | 'MIN' '(' 'DISTINCT'? Expression ')' | 'MAX' '(' 'DISTINCT'? Expression ')' | 'AVG' '(' 'DISTINCT'? Expression ')' | 'SAMPLE' '(' 'DISTINCT'? Expression ')' | 'GROUP_CONCAT' '(' 'DISTINCT'? Expression (';' 'SEPARATOR' '=' String)? ')'

    annotation: ParserMethod<[], CstNode> = ...

    [109] Annotation ::= (Reifier | AnnotationBlock)*

    In delete contexts (DELETE DATA, DELETE WHERE, DeleteClause), annotation blocks without a preceding named reifier are rejected because they create anonymous reifiers (blank nodes), which are disallowed per grammar note 7.

    annotationBlock: ParserMethod<[], CstNode> = ...

    [110] AnnotationBlock ::= '{|' PropertyListNotEmpty '|}'

    annotationBlockPath: ParserMethod<[], CstNode> = ...

    [108] AnnotationBlockPath ::= '{|' PropertyListPathNotEmpty '|}'

    annotationPath: ParserMethod<[], CstNode> = ...

    [107] AnnotationPath ::= (Reifier | AnnotationBlockPath)*

    Per spec note 16: annotations and reifiers are only permitted when the predicate is a simple path (IRI, 'a', or variable), not for complex path expressions (sequence, alternative, inverse, modifiers, negation, grouping).

    anon: ParserMethod<[], CstNode> = ...
    argList: ParserMethod<[], CstNode> = ...

    [74] ArgList ::= NIL | '(' 'DISTINCT'? Expression (',' Expression)* ')'

    askQuery: ParserMethod<[], CstNode> = ...

    [14] AskQuery ::= 'ASK' DatasetClause* WhereClause SolutionModifier

    baseDecl: ParserMethod<[], CstNode> = ...

    [5] BaseDecl ::= 'BASE' IRIREF

    bind: ParserMethod<[], CstNode> = ...

    [63] Bind ::= 'BIND' '(' Expression 'AS' Var ')'

    blankNode: ParserMethod<[], CstNode> = ...

    [148] BlankNode ::= BLANK_NODE_LABEL | ANON

    blankNodePropertyList: ParserMethod<[], CstNode> = ...

    BlankNodePropertyList ::= '[' PropertyListNotEmpty ']'

    blankNodePropertyListPath: ParserMethod<[], CstNode> = ...

    BlankNodePropertyListPath ::= '[' PropertyListPathNotEmpty ']'

    booleanLiteral: ParserMethod<[], CstNode> = ...

    [144] BooleanLiteral ::= 'true' | 'false'

    brackettedExpression: ParserMethod<[], CstNode> = ...

    [129] BrackettedExpression ::= '(' Expression ')'

    builtInCall: ParserMethod<[], CstNode> = ...

    [131] BuiltInCall - dispatches to sub-groups to stay within Chevrotain's CONSUME index limits

    builtInCallDateTimeFuncs: ParserMethod<[], CstNode> = ...

    Date/time built-ins: YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS, TIMEZONE, TZ, NOW

    builtInCallHashFuncs: ParserMethod<[], CstNode> = ...

    Hash built-ins: MD5, SHA1, SHA256, SHA384, SHA512

    builtInCallMiscFuncs: ParserMethod<[], CstNode> = ...

    Miscellaneous built-ins: COALESCE, IF, UUID, STRUUID

    builtInCallNumericFuncs: ParserMethod<[], CstNode> = ...

    Numeric built-ins: ABS, CEIL, FLOOR, ROUND, RAND

    builtInCallRdf12Funcs: ParserMethod<[], CstNode> = ...

    RDF 1.2 built-ins: isTRIPLE, TRIPLE, SUBJECT, PREDICATE, OBJECT, hasLANG, hasLANGDIR

    builtInCallStringFuncs: ParserMethod<[], CstNode> = ...

    String built-ins part 1: STRLEN, UCASE, LCASE, ENCODE_FOR_URI, CONTAINS, STRSTARTS, CONCAT

    builtInCallStringFuncs2: ParserMethod<[], CstNode> = ...

    String built-ins part 2: STRENDS, STRBEFORE, STRAFTER

    builtInCallStringFuncs3: ParserMethod<[], CstNode> = ...

    String built-ins part 3: STRLANG, STRLANGDIR, STRDT

    builtInCallTermAccessors: ParserMethod<[], CstNode> = ...

    Term accessor built-ins: STR, LANG, LANGDIR, DATATYPE, IRI, URI, BNODE

    builtInCallTestFuncs: ParserMethod<[], CstNode> = ...

    Test built-ins: sameTerm, isIRI, isURI, isBLANK, isLITERAL, isNUMERIC

    clear: ParserMethod<[], CstNode> = ...

    [34] Clear ::= 'CLEAR' 'SILENT'? GraphRefAll

    collection: ParserMethod<[], CstNode> = ...

    Collection ::= '(' GraphNode+ ')'

    collectionPath: ParserMethod<[], CstNode> = ...

    CollectionPath ::= '(' GraphNodePath+ ')'

    conditionalAndExpression: ParserMethod<[], CstNode> = ...

    [121] ConditionalAndExpression ::= ValueLogical ('&&' ValueLogical)*

    conditionalOrExpression: ParserMethod<[], CstNode> = ...

    [120] ConditionalOrExpression ::= ConditionalAndExpression ('||' ConditionalAndExpression)*

    constraint: ParserMethod<[], CstNode> = ...

    [72] Constraint ::= BrackettedExpression | BuiltInCall | FunctionCall

    constructQuery: ParserMethod<[], CstNode> = ...

    [12] ConstructQuery ::= 'CONSTRUCT' (ConstructTemplate DatasetClause* WhereClause SolutionModifier | DatasetClause* 'WHERE' '{' TriplesTemplate? '}' SolutionModifier)

    constructTemplate: ParserMethod<[], CstNode> = ...

    [76] ConstructTemplate ::= '{' ConstructTriples? '}'

    constructTriples: ParserMethod<[], CstNode> = ...

    [77] ConstructTriples ::= TriplesSameSubject ('.' ConstructTriples?)?

    copy: ParserMethod<[], CstNode> = ...

    [39] Copy ::= 'COPY' 'SILENT'? GraphOrDefault 'TO' GraphOrDefault

    create: ParserMethod<[], CstNode> = ...

    [36] Create ::= 'CREATE' 'SILENT'? GraphRef

    dataBlock: ParserMethod<[], CstNode> = ...

    [65] DataBlock ::= InlineDataOneVar | InlineDataFull

    dataBlockValue: ParserMethod<[], CstNode> = ...

    [68] DataBlockValue ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | 'UNDEF' | TripleTermData

    datasetClause: ParserMethod<[], CstNode> = ...

    [15] DatasetClause ::= 'FROM' (DefaultGraphClause | NamedGraphClause)

    defaultGraphClause: ParserMethod<[], CstNode> = ...

    [16] DefaultGraphClause ::= SourceSelector

    deleteClause: ParserMethod<[], CstNode> = ...

    [44] DeleteClause ::= 'DELETE' QuadPattern

    deleteData: ParserMethod<[], CstNode> = ...

    [41] DeleteData ::= 'DELETE' 'DATA' QuadData

    deleteWhere: ParserMethod<[], CstNode> = ...

    [42] DeleteWhere ::= 'DELETE' 'WHERE' QuadPattern

    describeQuery: ParserMethod<[], CstNode> = ...

    [13] DescribeQuery ::= 'DESCRIBE' (VarOrIri+ | '') DatasetClause WhereClause? SolutionModifier

    drop: ParserMethod<[], CstNode> = ...

    [35] Drop ::= 'DROP' 'SILENT'? GraphRefAll

    An array of recognition exceptions that occurred during parsing. This can be used to identify and handle any syntax errors in the input document.

    existsFunc: ParserMethod<[], CstNode> = ...

    [135] ExistsFunc ::= 'EXISTS' GroupGraphPattern

    expression: ParserMethod<[], CstNode> = ...

    [119] Expression ::= ConditionalOrExpression

    expressionList: ParserMethod<[], CstNode> = ...

    [75] ExpressionList ::= NIL | '(' Expression (',' Expression)* ')'

    exprTripleTerm: ParserMethod<[], CstNode> = ...

    [137] ExprTripleTerm ::= '<<(' ExprTripleTermSubject Verb ExprTripleTermObject ')>>'

    exprTripleTermObject: ParserMethod<[], CstNode> = ...

    [139] ExprTripleTermObject ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | Var | ExprTripleTerm

    exprTripleTermSubject: ParserMethod<[], CstNode> = ...

    [138] ExprTripleTermSubject ::= iri | Var

    filter: ParserMethod<[], CstNode> = ...

    [71] Filter ::= 'FILTER' Constraint

    functionCall: ParserMethod<[], CstNode> = ...

    [73] FunctionCall ::= iri ArgList

    graphGraphPattern: ParserMethod<[], CstNode> = ...

    [61] GraphGraphPattern ::= 'GRAPH' VarOrIri GroupGraphPattern

    graphNode: ParserMethod<[], CstNode> = ...

    [113] GraphNode ::= VarOrTerm | TriplesNode | ReifiedTriple

    graphNodePath: ParserMethod<[], CstNode> = ...

    [114] GraphNodePath ::= VarOrTerm | TriplesNodePath | ReifiedTriple

    graphObject: ParserMethod<[], CstNode> = ...

    [86] Object ::= GraphNode Annotation

    graphOrDefault: ParserMethod<[], CstNode> = ...

    [47] GraphOrDefault ::= 'DEFAULT' | 'GRAPH'? iri

    graphPatternNotTriples: ParserMethod<[], CstNode> = ...

    [58] GraphPatternNotTriples ::= GroupOrUnionGraphPattern | OptionalGraphPattern | MinusGraphPattern | GraphGraphPattern | ServiceGraphPattern | Filter | Bind | InlineData | ReifiedTripleBlockPath

    graphRef: ParserMethod<[], CstNode> = ...

    [48] GraphRef ::= 'GRAPH' iri

    graphRefAll: ParserMethod<[], CstNode> = ...

    [49] GraphRefAll ::= GraphRef | 'DEFAULT' | 'NAMED' | 'ALL'

    graphTerm: ParserMethod<[], CstNode> = ...

    GraphTerm ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | NIL | TripleTerm

    groupClause: ParserMethod<[], CstNode> = ...

    [21] GroupClause ::= 'GROUP' 'BY' GroupCondition+

    groupCondition: ParserMethod<[], CstNode> = ...

    [22] GroupCondition ::= BuiltInCall | FunctionCall | '(' Expression ('AS' Var)? ')' | Var

    groupGraphPattern: ParserMethod<[], CstNode> = ...

    [55] GroupGraphPattern ::= '{' (SubSelect | GroupGraphPatternSub) '}'

    groupGraphPatternSub: ParserMethod<[], CstNode> = ...

    [56] GroupGraphPatternSub ::= TriplesBlock? (GraphPatternNotTriples '.'? TriplesBlock?)*

    groupOrUnionGraphPattern: ParserMethod<[], CstNode> = ...

    [70] GroupOrUnionGraphPattern ::= GroupGraphPattern ('UNION' GroupGraphPattern)*

    havingClause: ParserMethod<[], CstNode> = ...

    [23] HavingClause ::= 'HAVING' HavingCondition+

    havingCondition: ParserMethod<[], CstNode> = ...

    [24] HavingCondition ::= Constraint

    inlineData: ParserMethod<[], CstNode> = ...

    [64] InlineData ::= 'VALUES' DataBlock

    inlineDataFull: ParserMethod<[], CstNode> = ...

    [67] InlineDataFull ::= (NIL | '(' Var* ')') '{' ('(' DataBlockValue* ')' | NIL)* '}'

    inlineDataOneVar: ParserMethod<[], CstNode> = ...

    [66] InlineDataOneVar ::= Var '{' DataBlockValue* '}'

    insertClause: ParserMethod<[], CstNode> = ...

    [45] InsertClause ::= 'INSERT' QuadPattern

    insertData: ParserMethod<[], CstNode> = ...

    [40] InsertData ::= 'INSERT' 'DATA' QuadData

    iri: ParserMethod<[], CstNode> = ...

    [146] iri ::= IRIREF | PrefixedName

    iriOrFunction: ParserMethod<[], CstNode> = ...

    [138] iriOrFunction ::= iri ArgList?

    limitClause: ParserMethod<[], CstNode> = ...

    [28] LimitClause ::= 'LIMIT' INTEGER

    limitOffsetClauses: ParserMethod<[], CstNode> = ...

    [27] LimitOffsetClauses ::= LimitClause OffsetClause? | OffsetClause LimitClause?

    literal: ParserMethod<[], CstNode> = ...

    Literal ::= RDFLiteral | NumericLiteral | BooleanLiteral

    load: ParserMethod<[], CstNode> = ...

    [33] Load ::= 'LOAD' 'SILENT'? iri ('INTO' GraphRef)?

    minusGraphPattern: ParserMethod<[], CstNode> = ...

    [69] MinusGraphPattern ::= 'MINUS' GroupGraphPattern

    modify: ParserMethod<[], CstNode> = ...

    [43] Modify ::= ('WITH' iri)? (DeleteClause InsertClause? | InsertClause) UsingClause* 'WHERE' GroupGraphPattern

    move: ParserMethod<[], CstNode> = ...

    [38] Move ::= 'MOVE' 'SILENT'? GraphOrDefault 'TO' GraphOrDefault

    multiplicativeExpression: ParserMethod<[], CstNode> = ...

    [126] MultiplicativeExpression ::= UnaryExpression (('' UnaryExpression) | ('/' UnaryExpression))

    namedGraphClause: ParserMethod<[], CstNode> = ...

    [17] NamedGraphClause ::= 'NAMED' SourceSelector

    namespaces: Record<string, string> = {}

    A map of prefixes to their namespace IRI.

    notExistsFunc: ParserMethod<[], CstNode> = ...

    [136] NotExistsFunc ::= 'NOT' 'EXISTS' GroupGraphPattern

    numericExpression: ParserMethod<[], CstNode> = ...

    [124] NumericExpression ::= AdditiveExpression

    numericLiteral: ParserMethod<[], CstNode> = ...

    [140] NumericLiteral ::= NumericLiteralUnsigned | NumericLiteralPositive | NumericLiteralNegative

    numericLiteralNegative: ParserMethod<[], CstNode> = ...

    [143] NumericLiteralNegative ::= INTEGER_NEGATIVE | DECIMAL_NEGATIVE | DOUBLE_NEGATIVE

    numericLiteralPositive: ParserMethod<[], CstNode> = ...

    [142] NumericLiteralPositive ::= INTEGER_POSITIVE | DECIMAL_POSITIVE | DOUBLE_POSITIVE

    numericLiteralUnsigned: ParserMethod<[], CstNode> = ...

    [141] NumericLiteralUnsigned ::= INTEGER | DECIMAL | DOUBLE

    objectList: ParserMethod<[], CstNode> = ...

    [85] ObjectList ::= Object (',' Object)*

    objectListPath: ParserMethod<[], CstNode> = ...

    [92] ObjectListPath ::= ObjectPath (',' ObjectPath)*

    objectPath: ParserMethod<[], CstNode> = ...

    [93] ObjectPath ::= GraphNodePath AnnotationPath

    offsetClause: ParserMethod<[], CstNode> = ...

    [29] OffsetClause ::= 'OFFSET' INTEGER

    optionalGraphPattern: ParserMethod<[], CstNode> = ...

    [60] OptionalGraphPattern ::= 'OPTIONAL' GroupGraphPattern

    orderClause: ParserMethod<[], CstNode> = ...

    [25] OrderClause ::= 'ORDER' 'BY' OrderCondition+

    orderCondition: ParserMethod<[], CstNode> = ...

    [26] OrderCondition ::= (('ASC' | 'DESC') BrackettedExpression) | (Constraint | Var)

    path: ParserMethod<[], CstNode> = ...

    [91] Path ::= PathAlternative

    pathAlternative: ParserMethod<[], CstNode> = ...

    [92] PathAlternative ::= PathSequence ('|' PathSequence)*

    pathElt: ParserMethod<[], CstNode> = ...

    [94] PathElt ::= PathPrimary PathMod?

    pathEltOrInverse: ParserMethod<[], CstNode> = ...

    [95] PathEltOrInverse ::= PathElt | '^' PathElt

    pathMod: ParserMethod<[], CstNode> = ...

    [96] PathMod ::= '?' | '*' | '+'

    pathNegatedPropertySet: ParserMethod<[], CstNode> = ...

    [98] PathNegatedPropertySet ::= PathOneInPropertySet | '(' (PathOneInPropertySet ('|' PathOneInPropertySet)*)? ')'

    pathOneInPropertySet: ParserMethod<[], CstNode> = ...

    [99] PathOneInPropertySet ::= iri | 'a' | '^' (iri | 'a')

    pathPrimary: ParserMethod<[], CstNode> = ...

    [97] PathPrimary ::= iri | 'a' | '!' PathNegatedPropertySet | '(' Path ')'

    pathSequence: ParserMethod<[], CstNode> = ...

    [93] PathSequence ::= PathEltOrInverse ('/' PathEltOrInverse)*

    prefixDecl: ParserMethod<[], CstNode> = ...

    [6] PrefixDecl ::= 'PREFIX' PNAME_NS IRIREF

    prefixedName: ParserMethod<[], CstNode> = ...

    [147] PrefixedName ::= PNAME_LN | PNAME_NS

    primaryExpression: ParserMethod<[], CstNode> = ...

    [128] PrimaryExpression ::= BrackettedExpression | BuiltInCall | iriOrFunction | RDFLiteral | NumericLiteral | BooleanLiteral | Var | ExprTripleTerm

    prologue: ParserMethod<[], CstNode> = ...

    [4] Prologue ::= (BaseDecl | PrefixDecl | VersionDecl)*

    propertyList: ParserMethod<[], CstNode> = ...

    [79] PropertyList ::= PropertyListNotEmpty?

    propertyListNotEmpty: ParserMethod<[], CstNode> = ...

    [80] PropertyListNotEmpty ::= Verb ObjectList (';' (Verb ObjectList)?)*

    propertyListPath: ParserMethod<[], CstNode> = ...

    [85] PropertyListPath ::= PropertyListPathNotEmpty?

    propertyListPathNotEmpty: ParserMethod<[], CstNode> = ...

    [86] PropertyListPathNotEmpty ::= (VerbPath | VerbSimple) ObjectListPath (';' ((VerbPath | VerbSimple) ObjectListPath)?)*

    Per spec note 16: annotations and reifiers are only permitted when the predicate is a simple path (IRI, 'a', or variable). Inside annotation blocks, complex paths in verb position produce an error after parsing.

    quadData: ParserMethod<[], CstNode> = ...

    [51] QuadData ::= '{' Quads '}'

    quadPattern: ParserMethod<[], CstNode> = ...

    [50] QuadPattern ::= '{' Quads '}'

    quads: ParserMethod<[], CstNode> = ...

    [52] Quads ::= TriplesTemplate? (QuadsNotTriples '.'? TriplesTemplate?)*

    quadsNotTriples: ParserMethod<[], CstNode> = ...

    [53] QuadsNotTriples ::= 'GRAPH' VarOrIri '{' TriplesTemplate? '}'

    query: ParserMethod<[], CstNode> = ...

    [2] Query ::= Prologue (SelectQuery | ConstructQuery | DescribeQuery | AskQuery) ValuesClause Note: Prologue is factored out into queryOrUpdate.

    queryBody: ParserMethod<[], CstNode> = ...

    Query body after prologue: (SelectQuery | ConstructQuery | DescribeQuery | AskQuery) ValuesClause

    queryOrUpdate: ParserMethod<[], CstNode> = ...

    [1] QueryUnit ::= Query [30] UpdateUnit ::= Update Combined entry point that tries Query first, then Update.

    rdfLiteral: ParserMethod<[], CstNode> = ...

    [139] RDFLiteral ::= String (LANG_DIR | '^^' iri)?

    RECORDING_PHASE: boolean

    Flag indicating the Parser is at the recording phase. Can be used to implement methods similar to BaseParser.ACTION Or any other logic to requires knowledge of the recording phase. See:

    regexExpression: ParserMethod<[], CstNode> = ...

    [132] RegexExpression ::= 'REGEX' '(' Expression ',' Expression (',' Expression)? ')'

    reifiedTriple: ParserMethod<[], CstNode> = ...

    [102] ReifiedTriple ::= '<<' ReifiedTripleSubject Verb ReifiedTripleObject Reifier? '>>'

    reifiedTripleBlock: ParserMethod<[], CstNode> = ...

    [58] ReifiedTripleBlock ::= ReifiedTriple PropertyList

    reifiedTripleBlockPath: ParserMethod<[], CstNode> = ...

    [59] ReifiedTripleBlockPath ::= ReifiedTriple PropertyListPath

    reifiedTripleObject: ParserMethod<[], CstNode> = ...

    [118] ReifiedTripleObject ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | ReifiedTriple | TripleTerm Note: Unlike VarOrTerm, this does NOT include NIL.

    reifiedTripleObjectPath: ParserMethod<[], CstNode> = ...

    [118] ReifiedTripleObjectPath ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | ReifiedTriplePath | TripleTerm Note: Unlike VarOrTerm, this does NOT include NIL.

    reifiedTriplePath: ParserMethod<[], CstNode> = ...

    [103] ReifiedTriplePath ::= '<<' ReifiedTripleSubject VerbPath ReifiedTripleObjectPath Reifier? '>>'

    reifiedTriplePathBlock: ParserMethod<[], CstNode> = ...

    [101] ReifiedTriplePathBlock ::= ReifiedTriplePath PropertyListPathNotEmpty

    reifiedTripleSubject: ParserMethod<[], CstNode> = ...

    [117] ReifiedTripleSubject ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | ReifiedTriple | TripleTerm Note: Unlike VarOrTerm, this does NOT include NIL.

    reifier: ParserMethod<[], CstNode> = ...

    [111] Reifier ::= '~' VarOrReifierId?

    relationalExpression: ParserMethod<[], CstNode> = ...

    [123] RelationalExpression ::= NumericExpression ('=' NumericExpression | '!=' NumericExpression | '<' NumericExpression | '>' NumericExpression | '<=' NumericExpression | '>=' NumericExpression | 'IN' ExpressionList | 'NOT' 'IN' ExpressionList)?

    selectClause: ParserMethod<[], CstNode> = ...

    [11] SelectClause ::= 'SELECT' ('DISTINCT' | 'REDUCED')? ((Var | ('(' Expression 'AS' Var ')'))+ | '*')

    selectQuery: ParserMethod<[], CstNode> = ...

    [9] SelectQuery ::= SelectClause DatasetClause* WhereClause SolutionModifier

    semanticErrors: IRecognitionException[] = []

    Semantic errors collected during parsing (e.g., UndefinedNamespacePrefixError).

    serviceGraphPattern: ParserMethod<[], CstNode> = ...

    [62] ServiceGraphPattern ::= 'SERVICE' 'SILENT'? VarOrIri GroupGraphPattern

    solutionModifier: ParserMethod<[], CstNode> = ...

    [20] SolutionModifier ::= GroupClause? HavingClause? OrderClause? LimitOffsetClauses?

    sourceSelector: ParserMethod<[], CstNode> = ...

    [18] SourceSelector ::= iri

    string: ParserMethod<[], CstNode> = ...

    [145] String ::= STRING_LITERAL_QUOTE | STRING_LITERAL_SINGLE_QUOTE | STRING_LITERAL_LONG_QUOTE | STRING_LITERAL_LONG_SINGLE_QUOTE

    strReplaceExpression: ParserMethod<[], CstNode> = ...

    [134] StrReplaceExpression ::= 'REPLACE' '(' Expression ',' Expression ',' Expression (',' Expression)? ')'

    subSelect: ParserMethod<[], CstNode> = ...

    [10] SubSelect ::= SelectClause WhereClause SolutionModifier ValuesClause

    substringExpression: ParserMethod<[], CstNode> = ...

    [133] SubstringExpression ::= 'SUBSTR' '(' Expression ',' Expression (',' Expression)? ')'

    triplesBlock: ParserMethod<[], CstNode> = ...

    [57] TriplesBlock ::= TriplesSameSubjectPath ('.' TriplesBlock?)?

    triplesNode: ParserMethod<[], CstNode> = ...

    TriplesNode ::= Collection | BlankNodePropertyList

    triplesNodePath: ParserMethod<[], CstNode> = ...

    TriplesNodePath ::= CollectionPath | BlankNodePropertyListPath

    triplesSameSubject: ParserMethod<[], CstNode> = ...

    [78] TriplesSameSubject ::= VarOrTerm PropertyListNotEmpty | TriplesNode PropertyList | ReifiedTripleBlock

    triplesSameSubjectPath: ParserMethod<[], CstNode> = ...

    [84] TriplesSameSubjectPath ::= VarOrTerm PropertyListPathNotEmpty | TriplesNodePath PropertyListPath | ReifiedTripleBlockPath

    triplesTemplate: ParserMethod<[], CstNode> = ...

    [54] TriplesTemplate ::= TriplesSameSubject ('.' TriplesTemplate?)?

    tripleTerm: ParserMethod<[], CstNode> = ...

    [113] TripleTerm ::= '<<(' TripleTermSubject Verb TripleTermObject ')>>'

    tripleTermData: ParserMethod<[], CstNode> = ...

    [116] TripleTermData ::= '<<(' TripleTermDataSubject (iri | 'a') TripleTermDataObject ')>>'

    tripleTermDataObject: ParserMethod<[], CstNode> = ...

    [124] TripleTermDataObject ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | TripleTermData

    tripleTermDataSubject: ParserMethod<[], CstNode> = ...

    [123] TripleTermDataSubject ::= iri

    tripleTermObject: ParserMethod<[], CstNode> = ...

    [121] TripleTermObject ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | TripleTerm

    tripleTermSubject: ParserMethod<[], CstNode> = ...

    [120] TripleTermSubject ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | TripleTerm

    unaryExpression: ParserMethod<[], CstNode> = ...

    [135] UnaryExpression ::= '!' UnaryExpression | '+' PrimaryExpression | '-' PrimaryExpression | PrimaryExpression

    update: ParserMethod<[], CstNode> = ...

    [31] Update ::= Prologue (Update1 (';' Update)? )? Note: Prologue is factored out into queryOrUpdate.

    update1: ParserMethod<[], CstNode> = ...

    [32] Update1 ::= Load | Clear | Drop | Add | Move | Copy | Create | InsertData | DeleteData | DeleteWhere | Modify

    updateBody: ParserMethod<[], CstNode> = ...

    Update body after prologue: (Update1 (';' Update)?)?

    usingClause: ParserMethod<[], CstNode> = ...

    [46] UsingClause ::= 'USING' (iri | 'NAMED' iri)

    valueLogical: ParserMethod<[], CstNode> = ...

    [122] ValueLogical ::= RelationalExpression

    valuesClause: ParserMethod<[], CstNode> = ...

    ValuesClause ::= ('VALUES' DataBlock)?

    var: ParserMethod<[], CstNode> = ...

    Var ::= VAR1 | VAR2

    varOrIri: ParserMethod<[], CstNode> = ...

    VarOrIri ::= Var | iri

    varOrReifierId: ParserMethod<[], CstNode> = ...

    [112] VarOrReifierId ::= Var | iri | BlankNode

    varOrTerm: ParserMethod<[], CstNode> = ...

    VarOrTerm ::= Var | GraphTerm

    verb: ParserMethod<[], CstNode> = ...

    [81] Verb ::= VarOrIri | 'a'

    verbPath: ParserMethod<[], CstNode> = ...

    [87] VerbPath ::= Path

    verbSimple: ParserMethod<[], CstNode> = ...

    [88] VerbSimple ::= Var

    versionDecl: ParserMethod<[], CstNode> = ...

    [7] VersionDecl ::= 'VERSION' VersionSpecifier

    versionSpecifier: ParserMethod<[], CstNode> = ...

    [8] VersionSpecifier ::= STRING_LITERAL_QUOTE | STRING_LITERAL_SINGLE_QUOTE

    whereClause: ParserMethod<[], CstNode> = ...

    [19] WhereClause ::= 'WHERE'? GroupGraphPattern

    Accessors

    • get input(): IToken[]

      An array of tokens that were created by the lexer and used as input for the parser. This can be used to inspect the tokens that were processed during parsing, and to identify any issues with the tokenization process.

      Returns IToken[]

    • set input(value: IToken[]): void

      An array of tokens that were created by the lexer and used as input for the parser. This can be used to inspect the tokens that were processed during parsing, and to identify any issues with the tokenization process.

      Parameters

      • value: IToken[]

      Returns void

    Methods

    • Type Parameters

      • IN = any
      • OUT = any

      Returns new (...args: any[]) => ICstVisitor<IN, OUT>

    • Type Parameters

      • IN = any
      • OUT = any

      Returns new (...args: any[]) => ICstVisitor<IN, OUT>

    • Returns Record<string, Rule>

    • Returns ISerializedGast[]

    • Parses a set of tokens created by the lexer into a concrete syntax tree (CST) representing the parsed document.

      Parameters

      • tokens: IToken[]

        A set of tokens created by the lexer.

      • throwOnErrors: boolean = true

        Whether to throw an error if any parsing errors are detected. Defaults to true.

      Returns CstNode

      A concrete syntax tree (CST) object.

    • Parameters

      • prefixToken: IToken
      • iriToken: IToken

      Returns void

    • Resets the parser state, should be overridden for custom parsers which "carry" additional state. When overriding, remember to also invoke the super implementation!

      Returns void