@manta-eu/datalog-parser
Reference for @manta-eu/datalog-parser as it is on main, generated from its TypeScript sources.
The last release is 0.8.1. An export added on main since then arrives with the next release.
pnpm add @manta-eu/datalog-parser
Entry points
@manta-eu/datalog-parser, on this page@manta-eu/datalog-parser/sparql-text
Classes
DatalogAstBuilder
Extends
Constructors
Constructor
new DatalogAstBuilder(…
args):DatalogAstBuilder
Parameters
args
…any[]
Returns
Inherited from
BaseDatalogVisitor.constructor
Methods
additiveExpression()
additiveExpression(
children):DatalogExpression
Parameters
children
Returns
aggregate()
aggregate(
children):DatalogAggregate
Parameters
children
Returns
aggregateBind()
aggregateBind(
children):AggregateBinding
Parameters
children
Returns
aggregateFunction()
aggregateFunction(
children):Omit<UnaryAggregateBinding,"variable"|"groundedTarget"> |Omit<BinaryAggregateBinding,"variable"|"groundedTarget"> |Omit<PercentileAggregateBinding,"variable"|"groundedTarget">
Parameters
children
Returns
Omit<UnaryAggregateBinding, "variable" | "groundedTarget"> | Omit<BinaryAggregateBinding, "variable" | "groundedTarget"> | Omit<PercentileAggregateBinding, "variable" | "groundedTarget">
aggregateFunction1()
aggregateFunction1(
children):Omit<UnaryAggregateBinding,"variable"|"groundedTarget">
Parameters
children
Returns
Omit<UnaryAggregateBinding, "variable" | "groundedTarget">
aggregateFunction2()
aggregateFunction2(
children):Omit<BinaryAggregateBinding,"variable"|"groundedTarget">
Parameters
children
Returns
Omit<BinaryAggregateBinding, "variable" | "groundedTarget">
argumentList()
argumentList(
children):DatalogExpression[]
Parameters
children
Returns
asTarget()
asTarget(
children,missingMessage):object
Parameters
children
groundedAsTarget?
CstNode[]
VARIABLE?
IToken[]
missingMessage
string
Returns
object
groundedTarget?
optionalgroundedTarget?:DatalogTerm
variable
variable:
string
atom()
atom(
children):DatalogAggregateAtom
Parameters
children
Record<string, CstNode[]>
Returns
atomList()
atomList(
children):DatalogAggregateAtom[]
Parameters
children
Returns
bindAtom()
bindAtom(
children):DatalogBind
Parameters
children
Returns
bodyFormula()
bodyFormula(
children):DatalogBodyFormula
Parameters
children
Returns
bodyFormulaList()
bodyFormulaList(
children):DatalogBodyFormula[]
Parameters
children
Returns
booleanLiteral()
booleanLiteral(
children):LiteralTerm
Parameters
children
Returns
concatFunction()
concatFunction(
children):DatalogExpression
Parameters
children
Returns
conditionalAndExpression()
conditionalAndExpression(
children):DatalogExpression
Parameters
children
ConditionalAndExpressionCstChildren
Returns
conditionalOrExpression()
conditionalOrExpression(
children):DatalogExpression
Parameters
children
ConditionalOrExpressionCstChildren
Returns
defaultGraphAtom()
defaultGraphAtom(
children):DatalogAtom
Parameters
children
Returns
existsClause()
existsClause(
children):string[]
Parameters
children
Returns
string[]
expression()
expression(
children):DatalogExpression
Parameters
children
Returns
filterAtom()
filterAtom(
children):DatalogFilter
Parameters
children
Returns
functionCall()
functionCall(
children):DatalogExpression
Parameters
children
Returns
generalAtom()
generalAtom(
children):GeneralAtom
Parameters
children
Returns
graphName()
graphName(
children):DatalogTerm
Parameters
children
Returns
groundedAsTarget()
groundedAsTarget(
children):DatalogTerm
Parameters
children
Returns
ifFunction()
ifFunction(
children):DatalogExpression
Parameters
children
Returns
iri()
iri(
children):IriTerm
Parameters
children
Returns
iriFunction()
iriFunction(
children):DatalogExpression
Parameters
children
Returns
literal()
literal(
children):LiteralTerm
Parameters
children
Returns
multiplicativeExpression()
multiplicativeExpression(
children):DatalogExpression
Parameters
children
MultiplicativeExpressionCstChildren
Returns
negation()
negation(
children):DatalogNegation
Parameters
children
Returns
numericLiteral()
numericLiteral(
children):LiteralTerm
Parameters
children
Returns
onClause()
onClause(
children):object
Parameters
children
Returns
object
groundedOnTargets?
optionalgroundedOnTargets?:DatalogTerm[]
onVars
onVars:
string[]
percentileFunction()
percentileFunction(
children):Omit<PercentileAggregateBinding,"variable"|"groundedTarget">
Parameters
children
Returns
Omit<PercentileAggregateBinding, "variable" | "groundedTarget">
primaryExpression()
primaryExpression(
children):DatalogExpression
Parameters
children
Returns
regexFunction()
regexFunction(
children):DatalogExpression
Parameters
children
Returns
relationalExpression()
relationalExpression(
children):DatalogExpression
Parameters
children
RelationalExpressionCstChildren
Returns
roundFunction()
roundFunction(
children):DatalogExpression
Parameters
children
Returns
rule()
rule(
children):DatalogRuleAst
Parameters
children
Returns
ruleBody()
ruleBody(
children):DatalogBodyFormula[]
Parameters
children
Returns
ruleHead()
ruleHead(
children):DatalogAtom[]
Parameters
children
Returns
skolemAtom()
skolemAtom(
children):DatalogSkolem
Parameters
children
Returns
skolemFunction()
skolemFunction(
children):DatalogExpression
Parameters
children
Returns
strFunction()
strFunction(
children):DatalogExpression
Parameters
children
Returns
stringLiteral()
stringLiteral(
children):LiteralTerm
Parameters
children
Returns
term()
term(
children):DatalogTerm
Parameters
children
Returns
tupleTableAtom()
tupleTableAtom(
children):DatalogAtom
Parameters
children
Returns
unaryExpression()
unaryExpression(
children):DatalogExpression
Parameters
children
Returns
validateVisitor()
validateVisitor():
void
Will throw an error if the visitor is missing any required methods
visitXYZfor eachXYZgrammar rule.
Returns
void
Inherited from
BaseDatalogVisitor.validateVisitor
visit()
visit(
cstNode,param?):any
Parameters
cstNode
CstNode | CstNode[]
param?
any
Returns
any
Inherited from
BaseDatalogVisitor.visit
DatalogParser
Extends
CstParser
Extended by
Constructors
Constructor
new DatalogParser(
config?):DatalogParser
Parameters
config?
DatalogParserConfig = {}
Returns
Overrides
CstParser.constructor
Properties
aggregateBind
protectedaggregateBind:ParserMethod<[],CstNode>
aggregateFunction
protectedaggregateFunction:ParserMethod<[],CstNode>
aggregateFunction1
protectedaggregateFunction1:ParserMethod<[],CstNode>
aggregateFunction2
protectedaggregateFunction2:ParserMethod<[],CstNode>
atomList
protectedatomList:ParserMethod<[],CstNode>
bindAtom
protectedbindAtom:ParserMethod<[],CstNode>
errors
errors:
IRecognitionException[]
Inherited from
CstParser.errors
expression
protectedexpression:ParserMethod<[],CstNode>
functionCall
protectedfunctionCall:ParserMethod<[],CstNode>
iri
protectediri:ParserMethod<[],CstNode>
literal
protectedliteral:ParserMethod<[],CstNode>
onClause
protectedonClause:ParserMethod<[],CstNode>
percentileFunction
protectedpercentileFunction:ParserMethod<[],CstNode>
primaryExpression
protectedprimaryExpression:ParserMethod<[],CstNode>
RECORDING_PHASE
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:
- https://chevrotain.io/docs/guide/internals.html#grammar-recording to learn more on the recording phase and how Chevrotain works.
Inherited from
CstParser.RECORDING_PHASE
rule
rule:
ParserMethod<[],CstNode>
term
term:
ParserMethod<[],CstNode>
Accessors
atEndOfInput
Get Signature
get atEndOfInput():
boolean
Returns
boolean
input
Get Signature
get input():
IToken[]
Returns
IToken[]
Set Signature
set input(
value):void
Parameters
value
IToken[]
Returns
void
Inherited from
CstParser.input
Methods
ACTION()
protectedACTION<T>(impl):T
The Semantic Actions wrapper. Should be used to wrap semantic actions that either:
- May fail when executing in “recording phase”.
- Have global side effects that should be avoided during “recording phase”.
For more information see:
Type Parameters
T
T
Parameters
impl
() => T
Returns
T
Inherited from
CstParser.ACTION
AT_LEAST_ONE()
protectedAT_LEAST_ONE(actionORMethodDef):void
Convenience method, same as MANY but the repetition is of one or more. failing to match at least one repetition will result in a parsing error and cause a parsing error.
Parameters
actionORMethodDef
GrammarAction<any> | DSLMethodOptsWithErr<any>
The grammar action to optionally invoke multiple times or an “OPTIONS” object describing the grammar action and optional properties.
Returns
void
See
MANY
Inherited from
CstParser.AT_LEAST_ONE
AT_LEAST_ONE_SEP()
protectedAT_LEAST_ONE_SEP(options):void
Convenience method, same as MANY_SEP but the repetition is of one or more. failing to match at least one repetition will result in a parsing error and cause the parser to attempt error recovery.
Note that an additional optional property ERR_MSG can be used to provide custom error messages.
Parameters
options
AtLeastOneSepMethodOpts<any>
An object defining the grammar of each iteration and the separator between iterations
Returns
void
See
MANY_SEP
Inherited from
CstParser.AT_LEAST_ONE_SEP
atLeastOne()
protectedatLeastOne(idx,actionORMethodDef):void
Like AT_LEAST_ONE with the numerical suffix as a parameter, e.g:
atLeastOne(0, X) === AT_LEAST_ONE(X)
atLeastOne(1, X) === AT_LEAST_ONE1(X)
atLeastOne(2, X) === AT_LEAST_ONE2(X)
…
Parameters
idx
number
actionORMethodDef
GrammarAction<any> | DSLMethodOptsWithErr<any>
Returns
void
See
AT_LEAST_ONE
Inherited from
CstParser.atLeastOne
BACKTRACK()
protectedBACKTRACK<T>(grammarRule,args?): () =>boolean
Type Parameters
T
T
Parameters
grammarRule
(…args) => T
The rule to try and parse in backtracking mode.
args?
any[]
argument to be passed to the grammar rule execution
Returns
a lookahead function that will try to parse the given grammarRule and will return true if succeed.
() => boolean
Inherited from
CstParser.BACKTRACK
canTokenTypeBeDeletedInRecovery()
protectedcanTokenTypeBeDeletedInRecovery(tokType):boolean
By default, all token types may be deleted. This behavior may be overridden in inheriting parsers. The method receives the expected token type. The token that would be deleted can be received with LA.
Parameters
tokType
TokenType
Returns
boolean
Inherited from
CstParser.canTokenTypeBeDeletedInRecovery
canTokenTypeBeInsertedInRecovery()
protectedcanTokenTypeBeInsertedInRecovery(tokType):boolean
By default, all tokens type may be inserted. This behavior may be overridden in inheriting Recognizers for example: One may decide that only punctuation tokens may be inserted automatically as they have no additional semantic value. (A mandatory semicolon has no additional semantic meaning, but an Integer may have additional meaning depending on its int value and context (Inserting an integer 0 in cardinality: “[1..]” will cause semantic issues as the max of the cardinality will be greater than the min value (and this is a false error!).
Parameters
tokType
TokenType
Returns
boolean
Inherited from
CstParser.canTokenTypeBeInsertedInRecovery
computeContentAssist()
computeContentAssist(
startRuleName,precedingInput):ISyntacticContentAssistPath[]
Parameters
startRuleName
string
precedingInput
IToken[]
The token vector up to (not including) the content assist point
Returns
ISyntacticContentAssistPath[]
Inherited from
CstParser.computeContentAssist
consume()
protectedconsume(idx,tokType,options?):IToken
Like CONSUME with the numerical suffix as a parameter, e.g:
consume(0, X) === CONSUME(X)
consume(1, X) === CONSUME1(X)
consume(2, X) === CONSUME2(X)
…
Parameters
idx
number
tokType
TokenType
options?
ConsumeMethodOpts
Returns
IToken
See
CONSUME
Inherited from
CstParser.consume
CONSUME()
protectedCONSUME(tokType,options?):IToken
A Parsing DSL method use to consume a single Token. In EBNF terms this is equivalent to a Terminal.
A Token will be consumed, IFF the next token in the token vector matches tokType.
otherwise the parser may attempt to perform error recovery (if enabled).
The index in the method name indicates the unique occurrence of a terminal consumption inside a the top level rule. What this means is that if a terminal appears more than once in a single rule, each appearance must have a different index.
For example:
this.RULE("qualifiedName", () => {
this.CONSUME1(Identifier);
this.MANY(() => {
this.CONSUME1(Dot);
// here we use CONSUME2 because the terminal
// 'Identifier' has already appeared previously in the
// the rule 'parseQualifiedName'
this.CONSUME2(Identifier);
});
})
- See more details on the unique suffixes requirement.
Parameters
tokType
TokenType
The Type of the token to be consumed.
options?
ConsumeMethodOpts
optional properties to modify the behavior of CONSUME.
Returns
IToken
Inherited from
CstParser.CONSUME
getBaseCstVisitorConstructor()
getBaseCstVisitorConstructor<
IN,OUT>(): new (…args) =>ICstVisitor<IN,OUT>
Type Parameters
IN
IN = any
OUT
OUT = any
Returns
new (…args) => ICstVisitor<IN, OUT>
Inherited from
CstParser.getBaseCstVisitorConstructor
getBaseCstVisitorConstructorWithDefaults()
getBaseCstVisitorConstructorWithDefaults<
IN,OUT>(): new (…args) =>ICstVisitor<IN,OUT>
Type Parameters
IN
IN = any
OUT
OUT = any
Returns
new (…args) => ICstVisitor<IN, OUT>
Inherited from
CstParser.getBaseCstVisitorConstructorWithDefaults
getGAstProductions()
getGAstProductions():
Record<string,Rule>
Returns
Record<string, Rule>
Inherited from
CstParser.getGAstProductions
getNextPossibleTokenTypes()
protectedgetNextPossibleTokenTypes(grammarPath):TokenType[]
Parameters
grammarPath
ITokenGrammarPath
Returns
TokenType[]
Deprecated
- will be removed in the future
Inherited from
CstParser.getNextPossibleTokenTypes
getSerializedGastProductions()
getSerializedGastProductions():
ISerializedGast[]
Returns
ISerializedGast[]
Inherited from
CstParser.getSerializedGastProductions
getTokenToInsert()
protectedgetTokenToInsert(tokType):IToken
Returns an “imaginary” Token to insert when Single Token Insertion is done Override this if you require special behavior in your grammar. For example if an IntegerToken is required provide one with the image ‘0’ so it would be valid syntactically.
Parameters
tokType
TokenType
Returns
IToken
Inherited from
CstParser.getTokenToInsert
LA()
protectedLA(howMuch):IToken
Look-Ahead for the Token Vector LA(1) is the next Token ahead. LA(n) is the nth Token ahead. LA(0) is the previously consumed Token.
Looking beyond the end of the Token Vector or before its beginning will return in an IToken of type EOF EOF. This behavior can be used to avoid infinite loops.
This is often used to implement custom lookahead logic for GATES. https://chevrotain.io/docs/features/gates.html
Parameters
howMuch
number
Returns
IToken
Inherited from
CstParser.LA
many()
protectedmany(idx,actionORMethodDef):void
Like MANY with the numerical suffix as a parameter, e.g:
many(0, X) === MANY(X)
many(1, X) === MANY1(X)
many(2, X) === MANY2(X)
…
Parameters
idx
number
actionORMethodDef
GrammarAction<any> | DSLMethodOpts<any>
Returns
void
See
MANY
Inherited from
CstParser.many
MANY()
protectedMANY(actionORMethodDef):void
Parsing DSL method, that indicates a repetition of zero or more. This is equivalent to EBNF repetition {…}.
Note that there are two syntax forms:
-
Passing the grammar action directly:
this.MANY(() => { this.CONSUME(Comma) this.CONSUME(Digit) }) -
using an “options” object:
this.MANY({ GATE: predicateFunc, DEF: () => { this.CONSUME(Comma) this.CONSUME(Digit) } });
The optional ‘GATE’ property in “options” object form can be used to add constraints to invoking the grammar action.
As in CONSUME the index in the method name indicates the occurrence of the repetition production in it’s top rule.
Parameters
actionORMethodDef
GrammarAction<any> | DSLMethodOpts<any>
The grammar action to optionally invoke multiple times or an “OPTIONS” object describing the grammar action and optional properties.
Returns
void
Inherited from
CstParser.MANY
MANY_SEP()
protectedMANY_SEP(options):void
Parsing DSL method, that indicates a repetition of zero or more with a separator Token between the repetitions.
Example:
this.MANY_SEP({
SEP:Comma,
DEF: () => {
this.CONSUME(Number};
// ...
})
Note that because this DSL method always requires more than one argument the options object is always required and it is not possible to use a shorter form like in the MANY DSL method.
Note that for the purposes of deciding on whether or not another iteration exists Only a single Token is examined (The separator). Therefore if the grammar being implemented is so “crazy” to require multiple tokens to identify an item separator please use the more basic DSL methods to implement it.
As in CONSUME the index in the method name indicates the occurrence of the repetition production in it’s top rule.
Parameters
options
ManySepMethodOpts<any>
An object defining the grammar of each iteration and the separator between iterations
Returns
void
Inherited from
CstParser.MANY_SEP
option()
protectedoption<OUT>(idx,actionORMethodDef):OUT|undefined
Like OPTION with the numerical suffix as a parameter, e.g:
option(0, X) === OPTION(X)
option(1, X) === OPTION1(X)
option(2, X) === OPTION2(X)
…
Type Parameters
OUT
OUT
Parameters
idx
number
actionORMethodDef
GrammarAction<OUT> | DSLMethodOpts<OUT>
Returns
OUT | undefined
See
OPTION
Inherited from
CstParser.option
OPTION()
protectedOPTION<OUT>(actionORMethodDef):OUT|undefined
Parsing DSL Method that Indicates an Optional production. in EBNF notation this is equivalent to: “[…]”.
Note that there are two syntax forms:
-
Passing the grammar action directly:
this.OPTION(() => { this.CONSUME(Digit)} ); -
using an “options” object:
this.OPTION({ GATE:predicateFunc, DEF: () => { this.CONSUME(Digit) }});
The optional ‘GATE’ property in “options” object form can be used to add constraints to invoking the grammar action.
As in CONSUME the index in the method name indicates the occurrence of the optional production in it’s top rule.
Type Parameters
OUT
OUT
Parameters
actionORMethodDef
GrammarAction<OUT> | DSLMethodOpts<OUT>
The grammar action to optionally invoke once or an “OPTIONS” object describing the grammar action and optional properties.
Returns
OUT | undefined
The GrammarAction return value (OUT) if the optional syntax is encountered
or undefined if not.
Inherited from
CstParser.OPTION
or()
Call Signature
protectedor(idx,altsOrOpts):any
Like OR with the numerical suffix as a parameter, e.g:
or(0, X) === OR(X)
or(1, X) === OR1(X)
or(2, X) === OR2(X)
…
Parameters
idx
number
altsOrOpts
IOrAlt<any>[] | OrMethodOpts<any>
Returns
any
See
OR
Inherited from
CstParser.or
Call Signature
protectedor<T>(idx,altsOrOpts):T
Like OR with the numerical suffix as a parameter, e.g:
or(0, X) === OR(X)
or(1, X) === OR1(X)
or(2, X) === OR2(X)
…
Type Parameters
T
T
Parameters
idx
number
altsOrOpts
IOrAlt<T>[] | OrMethodOpts<T>
Returns
T
See
OR
Inherited from
CstParser.or
OR()
Call Signature
protectedOR<T>(altsOrOpts):T
Parsing DSL method that indicates a choice between a set of alternatives must be made. This is equivalent to an EBNF alternation (A | B | C | D …), except that the alternatives are ordered like in a PEG grammar. This means that the first matching alternative is always chosen.
There are several forms for the inner alternatives array:
-
Passing alternatives array directly:
this.OR([ { ALT:() => { this.CONSUME(One) }}, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ]) -
Passing alternative array directly with predicates (GATE):
this.OR([ { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) }}, { GATE: predicateFuncX, ALT:() => { this.CONSUME(Two) }}, { GATE: predicateFuncX, ALT:() => { this.CONSUME(Three) }} ]) -
These syntax forms can also be mixed:
this.OR([ { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) } }, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ]) -
Additionally an “options” object may be used:
this.OR({ DEF:[ { ALT:() => { this.CONSUME(One) }}, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ], // OPTIONAL property ERR_MSG: "A Number" })
The ‘predicateFuncX’ in the long form can be used to add constraints to choosing the alternative.
As in CONSUME the index in the method name indicates the occurrence of the alternation production in it’s top rule.
Type Parameters
T
T
Parameters
altsOrOpts
IOrAlt<T>[] | OrMethodOpts<T>
A set of alternatives or an “OPTIONS” object describing the alternatives and optional properties.
Returns
T
The result of invoking the chosen alternative.
Inherited from
CstParser.OR
Call Signature
protectedOR(altsOrOpts):any
Parsing DSL method that indicates a choice between a set of alternatives must be made. This is equivalent to an EBNF alternation (A | B | C | D …), except that the alternatives are ordered like in a PEG grammar. This means that the first matching alternative is always chosen.
There are several forms for the inner alternatives array:
-
Passing alternatives array directly:
this.OR([ { ALT:() => { this.CONSUME(One) }}, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ]) -
Passing alternative array directly with predicates (GATE):
this.OR([ { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) }}, { GATE: predicateFuncX, ALT:() => { this.CONSUME(Two) }}, { GATE: predicateFuncX, ALT:() => { this.CONSUME(Three) }} ]) -
These syntax forms can also be mixed:
this.OR([ { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) } }, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ]) -
Additionally an “options” object may be used:
this.OR({ DEF:[ { ALT:() => { this.CONSUME(One) }}, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ], // OPTIONAL property ERR_MSG: "A Number" })
The ‘predicateFuncX’ in the long form can be used to add constraints to choosing the alternative.
As in CONSUME the index in the method name indicates the occurrence of the alternation production in it’s top rule.
Parameters
altsOrOpts
IOrAlt<any>[] | OrMethodOpts<any>
A set of alternatives or an “OPTIONS” object describing the alternatives and optional properties.
Returns
any
The result of invoking the chosen alternative.
Inherited from
CstParser.OR
OVERRIDE_RULE()
protectedOVERRIDE_RULE<F>(name,implementation,config?):ParserMethod<Parameters<F>,CstNode>
Overrides a Grammar Rule See usage example in: https://github.com/chevrotain/chevrotain/blob/master/examples/parser/versioning/versioning.js
Type Parameters
F
F extends () => void
Parameters
name
string
implementation
F
config?
IRuleConfig<CstNode>
Returns
ParserMethod<Parameters<F>, CstNode>
Inherited from
CstParser.OVERRIDE_RULE
performSelfAnalysis()
protectedperformSelfAnalysis():void
This must be called at the end of a Parser constructor. See: http://chevrotain.io/docs/tutorial/step2_parsing.html#under-the-hood
Returns
void
Inherited from
CstParser.performSelfAnalysis
reset()
reset():
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
Inherited from
CstParser.reset
RULE()
protectedRULE<F>(name,implementation,config?):ParserMethod<Parameters<F>,CstNode>
Creates a Grammar Rule
Note that any parameters of your implementation must be optional as it will be called without parameters during the grammar recording phase.
Type Parameters
F
F extends () => void
Parameters
name
string
implementation
F
config?
IRuleConfig<CstNode>
Returns
ParserMethod<Parameters<F>, CstNode>
Inherited from
CstParser.RULE
SKIP_TOKEN()
protectedSKIP_TOKEN():IToken
Will consume a single token and return the next token, meaning the token after the skipped token.
Returns
IToken
Inherited from
CstParser.SKIP_TOKEN
subrule()
protectedsubrule<ARGS>(idx,ruleToCall,options?):CstNode
Like SUBRULE with the numerical suffix as a parameter, e.g:
subrule(0, X) === SUBRULE(X)
subrule(1, X) === SUBRULE1(X)
subrule(2, X) === SUBRULE2(X)
…
Type Parameters
ARGS
ARGS extends unknown[]
Parameters
idx
number
ruleToCall
ParserMethod<ARGS, CstNode>
options?
SubruleMethodOpts<ARGS>
Returns
CstNode
See
SUBRULE
Inherited from
CstParser.subrule
SUBRULE()
protectedSUBRULE<ARGS>(ruleToCall,options?):CstNode
The Parsing DSL Method is used by one rule to call another. It is equivalent to a non-Terminal in EBNF notation.
This may seem redundant as it does not actually do much. However using it is mandatory for all sub rule invocations.
Calling another rule without wrapping in SUBRULE(…) will cause errors/mistakes in the Parser’s self analysis phase, which will lead to errors in error recovery/automatic lookahead calculation and any other functionality relying on the Parser’s self analysis output.
As in CONSUME the index in the method name indicates the occurrence of the sub rule invocation in its rule.
Type Parameters
ARGS
ARGS extends unknown[]
Parameters
ruleToCall
ParserMethod<ARGS, CstNode>
options?
SubruleMethodOpts<ARGS>
Returns
CstNode
Inherited from
CstParser.SUBRULE
DatalogTokenError
A rule error located at one token, so the editor can underline it.
Extends
Error
Constructors
Constructor
new DatalogTokenError(
message,token):DatalogTokenError
Parameters
message
string
token
IToken
Returns
Overrides
Error.constructor
Properties
cause?
optionalcause?:unknown
Inherited from
Error.cause
message
message:
string
Inherited from
Error.message
name
name:
string
Inherited from
Error.name
stack?
optionalstack?:string
Inherited from
Error.stack
token
readonlytoken:IToken
stackTraceLimit
staticstackTraceLimit:number
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimit
Methods
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
Error.captureStackTrace
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTrace
ExpandedDatalogParser
Grammar variant for the grounded rules the engine returns.
Grounding substitutes an AS target with the value it computed, so
BIND(?spend > 500 AS ?highSpend) comes back as BIND(901.22 > 500 AS true).
It also emits atom-free aggregates (AGGREGATE(AVG(9.0) AS 9.0)) and
expression-only bindings (AGGREGATE(13 / 100 AS 0.13)). That is not valid
authored Datalog, and rules written by hand or by the agent must keep being
rejected, so the permissive grammar lives here rather than relaxing the strict one.
Extends
Constructors
Constructor
new ExpandedDatalogParser():
ExpandedDatalogParser
Returns
Overrides
Properties
aggregateBind
protectedaggregateBind:ParserMethod<[],CstNode>
Inherited from
aggregateFunction
protectedaggregateFunction:ParserMethod<[],CstNode>
Inherited from
DatalogParser.aggregateFunction
aggregateFunction1
protectedaggregateFunction1:ParserMethod<[],CstNode>
Inherited from
DatalogParser.aggregateFunction1
aggregateFunction2
protectedaggregateFunction2:ParserMethod<[],CstNode>
Inherited from
DatalogParser.aggregateFunction2
atomList
protectedatomList:ParserMethod<[],CstNode>
Inherited from
bindAtom
protectedbindAtom:ParserMethod<[],CstNode>
Inherited from
errors
errors:
IRecognitionException[]
Inherited from
expandedAggregate
protectedexpandedAggregate:ParserMethod<[],CstNode>
expandedAggregateBind
protectedexpandedAggregateBind:ParserMethod<[],CstNode>
expandedBindAtom
protectedexpandedBindAtom:ParserMethod<[],CstNode>
expandedOnClause
protectedexpandedOnClause:ParserMethod<[],CstNode>
expandedPrimaryExpression
protectedexpandedPrimaryExpression:ParserMethod<[],CstNode>
expression
protectedexpression:ParserMethod<[],CstNode>
Inherited from
functionCall
protectedfunctionCall:ParserMethod<[],CstNode>
Inherited from
groundedAsTarget
protectedgroundedAsTarget:ParserMethod<[],CstNode>
iri
protectediri:ParserMethod<[],CstNode>
Inherited from
literal
protectedliteral:ParserMethod<[],CstNode>
Inherited from
onClause
protectedonClause:ParserMethod<[],CstNode>
Inherited from
percentileFunction
protectedpercentileFunction:ParserMethod<[],CstNode>
Inherited from
DatalogParser.percentileFunction
primaryExpression
protectedprimaryExpression:ParserMethod<[],CstNode>
Inherited from
DatalogParser.primaryExpression
RECORDING_PHASE
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:
- https://chevrotain.io/docs/guide/internals.html#grammar-recording to learn more on the recording phase and how Chevrotain works.
Inherited from
rule
rule:
ParserMethod<[],CstNode>
Inherited from
term
term:
ParserMethod<[],CstNode>
Inherited from
Accessors
atEndOfInput
Get Signature
get atEndOfInput():
boolean
Returns
boolean
Inherited from
input
Get Signature
get input():
IToken[]
Returns
IToken[]
Set Signature
set input(
value):void
Parameters
value
IToken[]
Returns
void
Inherited from
Methods
ACTION()
protectedACTION<T>(impl):T
The Semantic Actions wrapper. Should be used to wrap semantic actions that either:
- May fail when executing in “recording phase”.
- Have global side effects that should be avoided during “recording phase”.
For more information see:
Type Parameters
T
T
Parameters
impl
() => T
Returns
T
Inherited from
AT_LEAST_ONE()
protectedAT_LEAST_ONE(actionORMethodDef):void
Convenience method, same as MANY but the repetition is of one or more. failing to match at least one repetition will result in a parsing error and cause a parsing error.
Parameters
actionORMethodDef
GrammarAction<any> | DSLMethodOptsWithErr<any>
The grammar action to optionally invoke multiple times or an “OPTIONS” object describing the grammar action and optional properties.
Returns
void
See
MANY
Inherited from
AT_LEAST_ONE_SEP()
protectedAT_LEAST_ONE_SEP(options):void
Convenience method, same as MANY_SEP but the repetition is of one or more. failing to match at least one repetition will result in a parsing error and cause the parser to attempt error recovery.
Note that an additional optional property ERR_MSG can be used to provide custom error messages.
Parameters
options
AtLeastOneSepMethodOpts<any>
An object defining the grammar of each iteration and the separator between iterations
Returns
void
See
MANY_SEP
Inherited from
DatalogParser.AT_LEAST_ONE_SEP
atLeastOne()
protectedatLeastOne(idx,actionORMethodDef):void
Like AT_LEAST_ONE with the numerical suffix as a parameter, e.g:
atLeastOne(0, X) === AT_LEAST_ONE(X)
atLeastOne(1, X) === AT_LEAST_ONE1(X)
atLeastOne(2, X) === AT_LEAST_ONE2(X)
…
Parameters
idx
number
actionORMethodDef
GrammarAction<any> | DSLMethodOptsWithErr<any>
Returns
void
See
AT_LEAST_ONE
Inherited from
BACKTRACK()
protectedBACKTRACK<T>(grammarRule,args?): () =>boolean
Type Parameters
T
T
Parameters
grammarRule
(…args) => T
The rule to try and parse in backtracking mode.
args?
any[]
argument to be passed to the grammar rule execution
Returns
a lookahead function that will try to parse the given grammarRule and will return true if succeed.
() => boolean
Inherited from
canTokenTypeBeDeletedInRecovery()
protectedcanTokenTypeBeDeletedInRecovery(tokType):boolean
By default, all token types may be deleted. This behavior may be overridden in inheriting parsers. The method receives the expected token type. The token that would be deleted can be received with LA.
Parameters
tokType
TokenType
Returns
boolean
Inherited from
DatalogParser.canTokenTypeBeDeletedInRecovery
canTokenTypeBeInsertedInRecovery()
protectedcanTokenTypeBeInsertedInRecovery(tokType):boolean
By default, all tokens type may be inserted. This behavior may be overridden in inheriting Recognizers for example: One may decide that only punctuation tokens may be inserted automatically as they have no additional semantic value. (A mandatory semicolon has no additional semantic meaning, but an Integer may have additional meaning depending on its int value and context (Inserting an integer 0 in cardinality: “[1..]” will cause semantic issues as the max of the cardinality will be greater than the min value (and this is a false error!).
Parameters
tokType
TokenType
Returns
boolean
Inherited from
DatalogParser.canTokenTypeBeInsertedInRecovery
computeContentAssist()
computeContentAssist(
startRuleName,precedingInput):ISyntacticContentAssistPath[]
Parameters
startRuleName
string
precedingInput
IToken[]
The token vector up to (not including) the content assist point
Returns
ISyntacticContentAssistPath[]
Inherited from
DatalogParser.computeContentAssist
consume()
protectedconsume(idx,tokType,options?):IToken
Like CONSUME with the numerical suffix as a parameter, e.g:
consume(0, X) === CONSUME(X)
consume(1, X) === CONSUME1(X)
consume(2, X) === CONSUME2(X)
…
Parameters
idx
number
tokType
TokenType
options?
ConsumeMethodOpts
Returns
IToken
See
CONSUME
Inherited from
CONSUME()
protectedCONSUME(tokType,options?):IToken
A Parsing DSL method use to consume a single Token. In EBNF terms this is equivalent to a Terminal.
A Token will be consumed, IFF the next token in the token vector matches tokType.
otherwise the parser may attempt to perform error recovery (if enabled).
The index in the method name indicates the unique occurrence of a terminal consumption inside a the top level rule. What this means is that if a terminal appears more than once in a single rule, each appearance must have a different index.
For example:
this.RULE("qualifiedName", () => {
this.CONSUME1(Identifier);
this.MANY(() => {
this.CONSUME1(Dot);
// here we use CONSUME2 because the terminal
// 'Identifier' has already appeared previously in the
// the rule 'parseQualifiedName'
this.CONSUME2(Identifier);
});
})
- See more details on the unique suffixes requirement.
Parameters
tokType
TokenType
The Type of the token to be consumed.
options?
ConsumeMethodOpts
optional properties to modify the behavior of CONSUME.
Returns
IToken
Inherited from
getBaseCstVisitorConstructor()
getBaseCstVisitorConstructor<
IN,OUT>(): new (…args) =>ICstVisitor<IN,OUT>
Type Parameters
IN
IN = any
OUT
OUT = any
Returns
new (…args) => ICstVisitor<IN, OUT>
Inherited from
DatalogParser.getBaseCstVisitorConstructor
getBaseCstVisitorConstructorWithDefaults()
getBaseCstVisitorConstructorWithDefaults<
IN,OUT>(): new (…args) =>ICstVisitor<IN,OUT>
Type Parameters
IN
IN = any
OUT
OUT = any
Returns
new (…args) => ICstVisitor<IN, OUT>
Inherited from
DatalogParser.getBaseCstVisitorConstructorWithDefaults
getGAstProductions()
getGAstProductions():
Record<string,Rule>
Returns
Record<string, Rule>
Inherited from
DatalogParser.getGAstProductions
getNextPossibleTokenTypes()
protectedgetNextPossibleTokenTypes(grammarPath):TokenType[]
Parameters
grammarPath
ITokenGrammarPath
Returns
TokenType[]
Deprecated
- will be removed in the future
Inherited from
DatalogParser.getNextPossibleTokenTypes
getSerializedGastProductions()
getSerializedGastProductions():
ISerializedGast[]
Returns
ISerializedGast[]
Inherited from
DatalogParser.getSerializedGastProductions
getTokenToInsert()
protectedgetTokenToInsert(tokType):IToken
Returns an “imaginary” Token to insert when Single Token Insertion is done Override this if you require special behavior in your grammar. For example if an IntegerToken is required provide one with the image ‘0’ so it would be valid syntactically.
Parameters
tokType
TokenType
Returns
IToken
Inherited from
DatalogParser.getTokenToInsert
LA()
protectedLA(howMuch):IToken
Look-Ahead for the Token Vector LA(1) is the next Token ahead. LA(n) is the nth Token ahead. LA(0) is the previously consumed Token.
Looking beyond the end of the Token Vector or before its beginning will return in an IToken of type EOF EOF. This behavior can be used to avoid infinite loops.
This is often used to implement custom lookahead logic for GATES. https://chevrotain.io/docs/features/gates.html
Parameters
howMuch
number
Returns
IToken
Inherited from
many()
protectedmany(idx,actionORMethodDef):void
Like MANY with the numerical suffix as a parameter, e.g:
many(0, X) === MANY(X)
many(1, X) === MANY1(X)
many(2, X) === MANY2(X)
…
Parameters
idx
number
actionORMethodDef
GrammarAction<any> | DSLMethodOpts<any>
Returns
void
See
MANY
Inherited from
MANY()
protectedMANY(actionORMethodDef):void
Parsing DSL method, that indicates a repetition of zero or more. This is equivalent to EBNF repetition {…}.
Note that there are two syntax forms:
-
Passing the grammar action directly:
this.MANY(() => { this.CONSUME(Comma) this.CONSUME(Digit) }) -
using an “options” object:
this.MANY({ GATE: predicateFunc, DEF: () => { this.CONSUME(Comma) this.CONSUME(Digit) } });
The optional ‘GATE’ property in “options” object form can be used to add constraints to invoking the grammar action.
As in CONSUME the index in the method name indicates the occurrence of the repetition production in it’s top rule.
Parameters
actionORMethodDef
GrammarAction<any> | DSLMethodOpts<any>
The grammar action to optionally invoke multiple times or an “OPTIONS” object describing the grammar action and optional properties.
Returns
void
Inherited from
MANY_SEP()
protectedMANY_SEP(options):void
Parsing DSL method, that indicates a repetition of zero or more with a separator Token between the repetitions.
Example:
this.MANY_SEP({
SEP:Comma,
DEF: () => {
this.CONSUME(Number};
// ...
})
Note that because this DSL method always requires more than one argument the options object is always required and it is not possible to use a shorter form like in the MANY DSL method.
Note that for the purposes of deciding on whether or not another iteration exists Only a single Token is examined (The separator). Therefore if the grammar being implemented is so “crazy” to require multiple tokens to identify an item separator please use the more basic DSL methods to implement it.
As in CONSUME the index in the method name indicates the occurrence of the repetition production in it’s top rule.
Parameters
options
ManySepMethodOpts<any>
An object defining the grammar of each iteration and the separator between iterations
Returns
void
Inherited from
option()
protectedoption<OUT>(idx,actionORMethodDef):OUT|undefined
Like OPTION with the numerical suffix as a parameter, e.g:
option(0, X) === OPTION(X)
option(1, X) === OPTION1(X)
option(2, X) === OPTION2(X)
…
Type Parameters
OUT
OUT
Parameters
idx
number
actionORMethodDef
GrammarAction<OUT> | DSLMethodOpts<OUT>
Returns
OUT | undefined
See
OPTION
Inherited from
OPTION()
protectedOPTION<OUT>(actionORMethodDef):OUT|undefined
Parsing DSL Method that Indicates an Optional production. in EBNF notation this is equivalent to: “[…]”.
Note that there are two syntax forms:
-
Passing the grammar action directly:
this.OPTION(() => { this.CONSUME(Digit)} ); -
using an “options” object:
this.OPTION({ GATE:predicateFunc, DEF: () => { this.CONSUME(Digit) }});
The optional ‘GATE’ property in “options” object form can be used to add constraints to invoking the grammar action.
As in CONSUME the index in the method name indicates the occurrence of the optional production in it’s top rule.
Type Parameters
OUT
OUT
Parameters
actionORMethodDef
GrammarAction<OUT> | DSLMethodOpts<OUT>
The grammar action to optionally invoke once or an “OPTIONS” object describing the grammar action and optional properties.
Returns
OUT | undefined
The GrammarAction return value (OUT) if the optional syntax is encountered
or undefined if not.
Inherited from
or()
Call Signature
protectedor(idx,altsOrOpts):any
Like OR with the numerical suffix as a parameter, e.g:
or(0, X) === OR(X)
or(1, X) === OR1(X)
or(2, X) === OR2(X)
…
Parameters
idx
number
altsOrOpts
IOrAlt<any>[] | OrMethodOpts<any>
Returns
any
See
OR
Inherited from
Call Signature
protectedor<T>(idx,altsOrOpts):T
Like OR with the numerical suffix as a parameter, e.g:
or(0, X) === OR(X)
or(1, X) === OR1(X)
or(2, X) === OR2(X)
…
Type Parameters
T
T
Parameters
idx
number
altsOrOpts
IOrAlt<T>[] | OrMethodOpts<T>
Returns
T
See
OR
Inherited from
OR()
Call Signature
protectedOR<T>(altsOrOpts):T
Parsing DSL method that indicates a choice between a set of alternatives must be made. This is equivalent to an EBNF alternation (A | B | C | D …), except that the alternatives are ordered like in a PEG grammar. This means that the first matching alternative is always chosen.
There are several forms for the inner alternatives array:
-
Passing alternatives array directly:
this.OR([ { ALT:() => { this.CONSUME(One) }}, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ]) -
Passing alternative array directly with predicates (GATE):
this.OR([ { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) }}, { GATE: predicateFuncX, ALT:() => { this.CONSUME(Two) }}, { GATE: predicateFuncX, ALT:() => { this.CONSUME(Three) }} ]) -
These syntax forms can also be mixed:
this.OR([ { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) } }, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ]) -
Additionally an “options” object may be used:
this.OR({ DEF:[ { ALT:() => { this.CONSUME(One) }}, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ], // OPTIONAL property ERR_MSG: "A Number" })
The ‘predicateFuncX’ in the long form can be used to add constraints to choosing the alternative.
As in CONSUME the index in the method name indicates the occurrence of the alternation production in it’s top rule.
Type Parameters
T
T
Parameters
altsOrOpts
IOrAlt<T>[] | OrMethodOpts<T>
A set of alternatives or an “OPTIONS” object describing the alternatives and optional properties.
Returns
T
The result of invoking the chosen alternative.
Inherited from
Call Signature
protectedOR(altsOrOpts):any
Parsing DSL method that indicates a choice between a set of alternatives must be made. This is equivalent to an EBNF alternation (A | B | C | D …), except that the alternatives are ordered like in a PEG grammar. This means that the first matching alternative is always chosen.
There are several forms for the inner alternatives array:
-
Passing alternatives array directly:
this.OR([ { ALT:() => { this.CONSUME(One) }}, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ]) -
Passing alternative array directly with predicates (GATE):
this.OR([ { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) }}, { GATE: predicateFuncX, ALT:() => { this.CONSUME(Two) }}, { GATE: predicateFuncX, ALT:() => { this.CONSUME(Three) }} ]) -
These syntax forms can also be mixed:
this.OR([ { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) } }, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ]) -
Additionally an “options” object may be used:
this.OR({ DEF:[ { ALT:() => { this.CONSUME(One) }}, { ALT:() => { this.CONSUME(Two) }}, { ALT:() => { this.CONSUME(Three) }} ], // OPTIONAL property ERR_MSG: "A Number" })
The ‘predicateFuncX’ in the long form can be used to add constraints to choosing the alternative.
As in CONSUME the index in the method name indicates the occurrence of the alternation production in it’s top rule.
Parameters
altsOrOpts
IOrAlt<any>[] | OrMethodOpts<any>
A set of alternatives or an “OPTIONS” object describing the alternatives and optional properties.
Returns
any
The result of invoking the chosen alternative.
Inherited from
OVERRIDE_RULE()
protectedOVERRIDE_RULE<F>(name,implementation,config?):ParserMethod<Parameters<F>,CstNode>
Overrides a Grammar Rule See usage example in: https://github.com/chevrotain/chevrotain/blob/master/examples/parser/versioning/versioning.js
Type Parameters
F
F extends () => void
Parameters
name
string
implementation
F
config?
IRuleConfig<CstNode>
Returns
ParserMethod<Parameters<F>, CstNode>
Inherited from
performSelfAnalysis()
protectedperformSelfAnalysis():void
This must be called at the end of a Parser constructor. See: http://chevrotain.io/docs/tutorial/step2_parsing.html#under-the-hood
Returns
void
Inherited from
DatalogParser.performSelfAnalysis
reset()
reset():
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
Inherited from
RULE()
protectedRULE<F>(name,implementation,config?):ParserMethod<Parameters<F>,CstNode>
Creates a Grammar Rule
Note that any parameters of your implementation must be optional as it will be called without parameters during the grammar recording phase.
Type Parameters
F
F extends () => void
Parameters
name
string
implementation
F
config?
IRuleConfig<CstNode>
Returns
ParserMethod<Parameters<F>, CstNode>
Inherited from
SKIP_TOKEN()
protectedSKIP_TOKEN():IToken
Will consume a single token and return the next token, meaning the token after the skipped token.
Returns
IToken
Inherited from
subrule()
protectedsubrule<ARGS>(idx,ruleToCall,options?):CstNode
Like SUBRULE with the numerical suffix as a parameter, e.g:
subrule(0, X) === SUBRULE(X)
subrule(1, X) === SUBRULE1(X)
subrule(2, X) === SUBRULE2(X)
…
Type Parameters
ARGS
ARGS extends unknown[]
Parameters
idx
number
ruleToCall
ParserMethod<ARGS, CstNode>
options?
SubruleMethodOpts<ARGS>
Returns
CstNode
See
SUBRULE
Inherited from
SUBRULE()
protectedSUBRULE<ARGS>(ruleToCall,options?):CstNode
The Parsing DSL Method is used by one rule to call another. It is equivalent to a non-Terminal in EBNF notation.
This may seem redundant as it does not actually do much. However using it is mandatory for all sub rule invocations.
Calling another rule without wrapping in SUBRULE(…) will cause errors/mistakes in the Parser’s self analysis phase, which will lead to errors in error recovery/automatic lookahead calculation and any other functionality relying on the Parser’s self analysis output.
As in CONSUME the index in the method name indicates the occurrence of the sub rule invocation in its rule.
Type Parameters
ARGS
ARGS extends unknown[]
Parameters
ruleToCall
ParserMethod<ARGS, CstNode>
options?
SubruleMethodOpts<ARGS>
Returns
CstNode
Inherited from
variableOrGroundedTarget()
protectedvariableOrGroundedTarget():void
Returns
void
Interfaces
AdditiveExpressionCstNode
Extends
CstNode
Properties
children
children:
AdditiveExpressionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"additiveExpression"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
AggregateBindCstNode
Extends
CstNode
Properties
children
children:
AggregateBindCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"aggregateBind"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
AggregateCstNode
Extends
CstNode
Properties
children
children:
AggregateCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"aggregate"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
AggregateFunction1CstNode
Extends
CstNode
Properties
children
children:
AggregateFunction1CstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"aggregateFunction1"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
AggregateFunction2CstNode
Extends
CstNode
Properties
children
children:
AggregateFunction2CstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"aggregateFunction2"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
AggregateFunctionCstNode
Extends
CstNode
Properties
children
children:
AggregateFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"aggregateFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
ArgumentListCstNode
Extends
CstNode
Properties
children
children:
ArgumentListCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"argumentList"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
AtomCstNode
Extends
CstNode
Properties
children
children:
AtomCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"atom"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
AtomListCstNode
Extends
CstNode
Properties
children
children:
AtomListCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"atomList"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
BindAtomCstNode
Extends
CstNode
Properties
children
children:
BindAtomCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"bindAtom"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
BodyFormulaCstNode
Extends
CstNode
Properties
children
children:
BodyFormulaCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"bodyFormula"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
BodyFormulaListCstNode
Extends
CstNode
Properties
children
children:
BodyFormulaListCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"bodyFormulaList"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
BooleanLiteralCstNode
Extends
CstNode
Properties
children
children:
BooleanLiteralCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"booleanLiteral"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
ConcatFunctionCstNode
Extends
CstNode
Properties
children
children:
ConcatFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"concatFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
ConditionalAndExpressionCstNode
Extends
CstNode
Properties
children
children:
ConditionalAndExpressionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"conditionalAndExpression"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
ConditionalOrExpressionCstNode
Extends
CstNode
Properties
children
children:
ConditionalOrExpressionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"conditionalOrExpression"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
DefaultGraphAtomCstNode
Extends
CstNode
Properties
children
children:
DefaultGraphAtomCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"defaultGraphAtom"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
ExistsClauseCstNode
Extends
CstNode
Properties
children
children:
ExistsClauseCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"existsClause"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
ExpressionCstNode
Extends
CstNode
Properties
children
children:
ExpressionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"expression"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
FilterAtomCstNode
Extends
CstNode
Properties
children
children:
FilterAtomCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"filterAtom"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
FunctionCallCstNode
Extends
CstNode
Properties
children
children:
FunctionCallCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"functionCall"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
GeneralAtomCstNode
Extends
CstNode
Properties
children
children:
GeneralAtomCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"generalAtom"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
GraphNameCstNode
Extends
CstNode
Properties
children
children:
GraphNameCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"graphName"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
GroundedAsTargetCstNode
Extends
CstNode
Properties
children
children:
GroundedAsTargetCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"groundedAsTarget"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
ICstNodeVisitor
Extends
ICstVisitor<IN,OUT>
Type Parameters
IN
IN
OUT
OUT
Methods
additiveExpression()
additiveExpression(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
aggregate()
aggregate(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
aggregateBind()
aggregateBind(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
aggregateFunction()
aggregateFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
aggregateFunction1()
aggregateFunction1(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
aggregateFunction2()
aggregateFunction2(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
argumentList()
argumentList(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
atom()
atom(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
atomList()
atomList(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
bindAtom()
bindAtom(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
bodyFormula()
bodyFormula(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
bodyFormulaList()
bodyFormulaList(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
booleanLiteral()
booleanLiteral(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
concatFunction()
concatFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
conditionalAndExpression()
conditionalAndExpression(
children,param?):OUT
Parameters
children
ConditionalAndExpressionCstChildren
param?
IN
Returns
OUT
conditionalOrExpression()
conditionalOrExpression(
children,param?):OUT
Parameters
children
ConditionalOrExpressionCstChildren
param?
IN
Returns
OUT
defaultGraphAtom()
defaultGraphAtom(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
existsClause()
existsClause(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
expression()
expression(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
filterAtom()
filterAtom(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
functionCall()
functionCall(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
generalAtom()
generalAtom(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
graphName()
graphName(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
groundedAsTarget()
groundedAsTarget(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
ifFunction()
ifFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
iri()
iri(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
iriFunction()
iriFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
literal()
literal(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
multiplicativeExpression()
multiplicativeExpression(
children,param?):OUT
Parameters
children
MultiplicativeExpressionCstChildren
param?
IN
Returns
OUT
negation()
negation(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
numericLiteral()
numericLiteral(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
onClause()
onClause(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
percentileFunction()
percentileFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
primaryExpression()
primaryExpression(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
regexFunction()
regexFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
relationalExpression()
relationalExpression(
children,param?):OUT
Parameters
children
RelationalExpressionCstChildren
param?
IN
Returns
OUT
roundFunction()
roundFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
rule()
rule(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
ruleBody()
ruleBody(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
ruleHead()
ruleHead(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
skolemAtom()
skolemAtom(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
skolemFunction()
skolemFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
strFunction()
strFunction(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
stringLiteral()
stringLiteral(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
term()
term(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
tupleTableAtom()
tupleTableAtom(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
unaryExpression()
unaryExpression(
children,param?):OUT
Parameters
children
param?
IN
Returns
OUT
validateVisitor()
validateVisitor():
void
Will throw an error if the visitor is missing any required methods
visitXYZfor eachXYZgrammar rule.
Returns
void
Inherited from
ICstVisitor.validateVisitor
visit()
visit(
cstNode,param?):OUT
Parameters
cstNode
CstNode | CstNode[]
param?
IN
Returns
OUT
Inherited from
ICstVisitor.visit
IfFunctionCstNode
Extends
CstNode
Properties
children
children:
IfFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"ifFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
IriCstNode
Extends
CstNode
Properties
children
children:
IriCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"iri"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
IriFunctionCstNode
Extends
CstNode
Properties
children
children:
IriFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"iriFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
LiteralCstNode
Extends
CstNode
Properties
children
children:
LiteralCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"literal"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
MultiplicativeExpressionCstNode
Extends
CstNode
Properties
children
children:
MultiplicativeExpressionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"multiplicativeExpression"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
NegationCstNode
Extends
CstNode
Properties
children
children:
NegationCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"negation"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
NumericLiteralCstNode
Extends
CstNode
Properties
children
children:
NumericLiteralCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"numericLiteral"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
OnClauseCstNode
Extends
CstNode
Properties
children
children:
OnClauseCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"onClause"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
PercentileFunctionCstNode
Extends
CstNode
Properties
children
children:
PercentileFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"percentileFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
PrimaryExpressionCstNode
Extends
CstNode
Properties
children
children:
PrimaryExpressionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"primaryExpression"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
RegexFunctionCstNode
Extends
CstNode
Properties
children
children:
RegexFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"regexFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
RelationalExpressionCstNode
Extends
CstNode
Properties
children
children:
RelationalExpressionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"relationalExpression"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
RoundFunctionCstNode
Extends
CstNode
Properties
children
children:
RoundFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"roundFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
RuleBodyCstNode
Extends
CstNode
Properties
children
children:
RuleBodyCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"ruleBody"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
RuleCstNode
Extends
CstNode
Properties
children
children:
RuleCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"rule"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
RuleHeadCstNode
Extends
CstNode
Properties
children
children:
RuleHeadCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"ruleHead"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
SkolemAtomCstNode
Extends
CstNode
Properties
children
children:
SkolemAtomCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"skolemAtom"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
SkolemFunctionCstNode
Extends
CstNode
Properties
children
children:
SkolemFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"skolemFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
SparqlSelectResult
Properties
query
query:
string
variables
variables:
string[]
StrFunctionCstNode
Extends
CstNode
Properties
children
children:
StrFunctionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"strFunction"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
StringLiteralCstNode
Extends
CstNode
Properties
children
children:
StringLiteralCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"stringLiteral"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
TermCstNode
Extends
CstNode
Properties
children
children:
TermCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"term"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
TupleTableAtomCstNode
Extends
CstNode
Properties
children
children:
TupleTableAtomCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"tupleTableAtom"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
UnaryExpressionCstNode
Extends
CstNode
Properties
children
children:
UnaryExpressionCstChildren
Overrides
CstNode.children
location?
readonlyoptionallocation?:CstNodeLocation
Will only be present if the IParserConfig.nodeLocationTracking is not set to “none”. See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.
Inherited from
CstNode.location
name
name:
"unaryExpression"
Overrides
CstNode.name
recoveredNode?
readonlyoptionalrecoveredNode?:boolean
A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node’s children may be missing.
- Note that single token insertion/deletion recovery would not activate this flag. This flag would only be activated in re-sync recovery when the rule’s grammar cannot be fully parsed.
- See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html for more info on error recovery and fault tolerance.
Inherited from
CstNode.recoveredNode
Type Aliases
AdditiveExpressionCstChildren
AdditiveExpressionCstChildren =
object
Properties
MINUS?
optionalMINUS?:IToken[]
multiplicativeExpression
multiplicativeExpression:
MultiplicativeExpressionCstNode[]
PLUS?
optionalPLUS?:IToken[]
AggregateBindCstChildren
AggregateBindCstChildren =
object
Properties
aggregateFunction?
optionalaggregateFunction?:AggregateFunctionCstNode[]
AS
AS:
IToken[]
BIND?
optionalBIND?:IToken[]
expression?
optionalexpression?:ExpressionCstNode[]
groundedAsTarget?
optionalgroundedAsTarget?:GroundedAsTargetCstNode[]
VARIABLE?
optionalVARIABLE?:IToken[]
AggregateBinding
AggregateBinding =
AggregateFunctionBinding|ExpressionAggregateBinding
AggregateBindingTarget
AggregateBindingTarget =
object
Properties
groundedTarget?
optionalgroundedTarget?:DatalogTerm
Set only when the expanded grammar read a value in AS position, as the engine’s grounded rules do.
variable
variable:
string
Target variable name without its ?, or the value’s text when groundedTarget is set.
AggregateCstChildren
AggregateCstChildren =
object
Properties
AGGREGATE
AGGREGATE:
IToken[]
aggregateBind?
optionalaggregateBind?:AggregateBindCstNode[]
atomList?
optionalatomList?:AtomListCstNode[]
LPAREN
LPAREN:
IToken[]
onClause?
optionalonClause?:OnClauseCstNode[]
RPAREN
RPAREN:
IToken[]
AggregateFunction
AggregateFunction =
UnaryAggregateFunction|BinaryAggregateFunction|PercentileAggregateFunction
AggregateFunction1CstChildren
AggregateFunction1CstChildren =
object
Properties
AVG?
optionalAVG?:IToken[]
COUNT?
optionalCOUNT?:IToken[]
COUNT_MAX?
optionalCOUNT_MAX?:IToken[]
COUNT_MIN?
optionalCOUNT_MIN?:IToken[]
DISTINCT?
optionalDISTINCT?:IToken[]
expression?
optionalexpression?:ExpressionCstNode[]
LPAREN
LPAREN:
IToken[]
MAX?
optionalMAX?:IToken[]
MIN?
optionalMIN?:IToken[]
MODE?
optionalMODE?:IToken[]
MUL?
optionalMUL?:IToken[]
RPAREN
RPAREN:
IToken[]
STAR?
optionalSTAR?:IToken[]
STDDEV_POP?
optionalSTDDEV_POP?:IToken[]
STDDEV_SAMP?
optionalSTDDEV_SAMP?:IToken[]
SUM?
optionalSUM?:IToken[]
VAR_POP?
optionalVAR_POP?:IToken[]
VAR_SAMP?
optionalVAR_SAMP?:IToken[]
AggregateFunction2CstChildren
AggregateFunction2CstChildren =
object
Properties
COMMA
COMMA:
IToken[]
DISTINCT?
optionalDISTINCT?:IToken[]
firstExpr
firstExpr:
ExpressionCstNode[]
LPAREN
LPAREN:
IToken[]
MAX_ARGMAX?
optionalMAX_ARGMAX?:IToken[]
MAX_ARGMIN?
optionalMAX_ARGMIN?:IToken[]
MIN_ARGMAX?
optionalMIN_ARGMAX?:IToken[]
MIN_ARGMIN?
optionalMIN_ARGMIN?:IToken[]
RPAREN
RPAREN:
IToken[]
secondExpr
secondExpr:
ExpressionCstNode[]
AggregateFunctionBinding
AggregateFunctionBinding =
UnaryAggregateBinding|BinaryAggregateBinding|PercentileAggregateBinding
AggregateFunctionCstChildren
AggregateFunctionCstChildren =
object
Properties
aggregateFunction1?
optionalaggregateFunction1?:AggregateFunction1CstNode[]
aggregateFunction2?
optionalaggregateFunction2?:AggregateFunction2CstNode[]
percentileFunction?
optionalpercentileFunction?:PercentileFunctionCstNode[]
ArgumentListCstChildren
ArgumentListCstChildren =
object
Properties
COMMA?
optionalCOMMA?:IToken[]
expression
expression:
ExpressionCstNode[]
AtomCstChildren
AtomCstChildren =
object
Properties
bindAtom?
optionalbindAtom?:BindAtomCstNode[]
filterAtom?
optionalfilterAtom?:FilterAtomCstNode[]
tupleTableAtom?
optionaltupleTableAtom?:TupleTableAtomCstNode[]
AtomListCstChildren
AtomListCstChildren =
object
Properties
atom
atom:
AtomCstNode[]
COMMA?
optionalCOMMA?:IToken[]
AuthoredDatalogRule
AuthoredDatalogRule =
DatalogRule&object
A rule AST that may be passed to SPARQL translators (excludes grounded ASTs).
Type Declaration
grounded?
optionalgrounded?:false
BinaryAggregateBinding
BinaryAggregateBinding =
AggregateBindingTarget&object
Type Declaration
distinct?
optionaldistinct?:boolean
expression
expression:
DatalogExpression
function
function:
BinaryAggregateFunction
percentile?
optionalpercentile?:never
secondExpression
secondExpression:
DatalogExpression
BinaryAggregateFunction
BinaryAggregateFunction =
"MIN_ARGMIN"|"MAX_ARGMIN"|"MIN_ARGMAX"|"MAX_ARGMAX"
BinaryExpression
BinaryExpression =
object
Properties
left
left:
DatalogExpression
operator
operator: “||” |
"&&"|"="|"!="|"<"|">"|"<="|">="|"+"|"-"|"*"|"/"
right
right:
DatalogExpression
type
type:
"binary"
BindAtomCstChildren
BindAtomCstChildren =
object
Properties
AS
AS:
IToken[]
BIND
BIND:
IToken[]
expression
expression:
ExpressionCstNode[]
groundedAsTarget?
optionalgroundedAsTarget?:GroundedAsTargetCstNode[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
VARIABLE?
optionalVARIABLE?:IToken[]
BlankNodeTerm
BlankNodeTerm =
object
Properties
label
label:
string
type
type:
"blank"
BodyFormulaCstChildren
BodyFormulaCstChildren =
object
Properties
aggregate?
optionalaggregate?:AggregateCstNode[]
bindAtom?
optionalbindAtom?:BindAtomCstNode[]
filterAtom?
optionalfilterAtom?:FilterAtomCstNode[]
negation?
optionalnegation?:NegationCstNode[]
skolemAtom?
optionalskolemAtom?:SkolemAtomCstNode[]
tupleTableAtom?
optionaltupleTableAtom?:TupleTableAtomCstNode[]
BodyFormulaListCstChildren
BodyFormulaListCstChildren =
object
Properties
bodyFormula
bodyFormula:
BodyFormulaCstNode[]
COMMA?
optionalCOMMA?:IToken[]
BooleanLiteralCstChildren
BooleanLiteralCstChildren =
object
Properties
FALSE?
optionalFALSE?:IToken[]
TRUE?
optionalTRUE?:IToken[]
ClassAssertion
ClassAssertion =
object
Properties
className
className:
string
graph?
optionalgraph?:DatalogTerm
instance
instance:
DatalogTerm
ClassAtom
ClassAtom =
object
Properties
className
className:
string
graph?
optionalgraph?:DatalogTerm
instance
instance:
DatalogTerm
type
type:
"class"
ComparisonOperator
ComparisonOperator =
Extract<BinaryExpression["operator"],"="|"!="|"<"|">"|"<="|">=">
ConcatFunctionCstChildren
ConcatFunctionCstChildren =
object
Properties
argumentList
argumentList:
ArgumentListCstNode[]
CONCAT
CONCAT:
IToken[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
ConditionalAndExpressionCstChildren
ConditionalAndExpressionCstChildren =
object
Properties
AND?
optionalAND?:IToken[]
relationalExpression
relationalExpression:
RelationalExpressionCstNode[]
ConditionalOrExpressionCstChildren
ConditionalOrExpressionCstChildren =
object
Properties
conditionalAndExpression
conditionalAndExpression:
ConditionalAndExpressionCstNode[]
OR?
optionalOR?:IToken[]
DatalogAggregate
DatalogAggregate =
object
Properties
atoms
atoms:
DatalogAggregateAtom[]
bindings?
optionalbindings?:AggregateBinding[]
groundedOnTargets?
optionalgroundedOnTargets?:DatalogTerm[]
Set only when the expanded grammar read values in ON position, as the engine’s grounded rules do.
onVars?
optionalonVars?:string[]
Grouping keys from ON …. Entries are variable names without ?, or the value’s
text when the expanded grammar read a substituted ON term (e.g. ":Company_42").
Order is not source order: the visitor lists all variables, then all grounded
targets. Do not feed grounded ASTs into SPARQL helpers that treat every entry as a
variable name (datalog-to-sparql-select, ast-utils) — use authored/strict ASTs there.
type
type:
"aggregate"
DatalogAggregateAtom
DatalogAggregateAtom =
DatalogAtom|DatalogFilter|DatalogBind
DatalogAtom
DatalogAtom =
TripleAtom|PropertyAtom|ClassAtom|GeneralAtom
DatalogBind
DatalogBind =
object
Properties
expression
expression:
DatalogExpression
groundedTarget?
optionalgroundedTarget?:DatalogTerm
Set only when the expanded grammar read a value in AS position, as the engine’s grounded rules do.
type
type:
"bind"
variable
variable:
string
Target variable name without its ?, or the value’s text when groundedTarget is set.
DatalogBodyFormula
DatalogBodyFormula =
DatalogAtom|DatalogNegation|DatalogAggregate|DatalogFilter|DatalogBind|DatalogSkolem
DatalogExpression
DatalogExpression =
BinaryExpression|UnaryExpression|TermExpression|FunctionCallExpression|InExpression
DatalogFilter
DatalogFilter =
object
Properties
expression
expression:
DatalogExpression
type
type:
"filter"
DatalogNegation
DatalogNegation =
object
Properties
existentialVars?
optionalexistentialVars?:string[]
formulas
formulas:
DatalogBodyFormula[]
type
type:
"negation"
DatalogParseIssue
DatalogParseIssue =
object
Properties
column?
optionalcolumn?:number
endOffset?
optionalendOffset?:number
line?
optionalline?:number
message
message:
string
offset?
optionaloffset?:number
DatalogParserConfig
DatalogParserConfig =
object
Properties
selfAnalysis?
optionalselfAnalysis?:boolean
DatalogParseResult
DatalogParseResult = {
ok:true;rule:DatalogRule; } | {issues:DatalogParseIssue[];ok:false; }
DatalogRule
DatalogRule =
DatalogRuleAst&object
Type Declaration
raw
raw:
string
spans?
optionalspans?:DatalogRuleSpans
DatalogRuleAst
DatalogRuleAst =
object
Properties
body
body:
DatalogBodyFormula[]
head
head:
DatalogAtom[]
DatalogRuleSourceTexts
DatalogRuleSourceTexts =
object
Properties
body
body:
string[]
head
head:
string[]
DatalogRuleSpans
DatalogRuleSpans =
object
Properties
body
body:
SourceSpan[]
head
head:
SourceSpan[]
DatalogSkolem
DatalogSkolem =
object
Properties
args
args:
DatalogExpression[]
type
type:
"skolem"
DatalogTerm
DatalogTerm =
VariableTerm|IriTerm|LiteralTerm|BlankNodeTerm
DatalogTextOptions
DatalogTextOptions =
object
Properties
stripSimpleLiteralDatatypes?
optionalstripSimpleLiteralDatatypes?:boolean
DatalogTextPart
DatalogTextPart = {
text:string;type:"text"; } | {name:string;type:"variable"; } | {literal:LiteralTerm;text:string;type:"literal"; }
DatalogToken
DatalogToken =
IToken
DataManipulationOptions
DataManipulationOptions =
object
Properties
defaultGraphOnly?
optionaldefaultGraphOnly?:boolean
DataManipulationSubType
DataManipulationSubType =
"insertdata"|"deletedata"|"modify"
DefaultGraphAtomCstChildren
DefaultGraphAtomCstChildren =
object
Properties
COMMA?
optionalCOMMA?:IToken[]
firstTerm?
optionalfirstTerm?:TermCstNode[]
LBRACKET?
optionalLBRACKET?:IToken[]
object?
optionalobject?:TermCstNode[]
predicate?
optionalpredicate?:TermCstNode[]
predicateOrClass?
optionalpredicateOrClass?:IriCstNode[]
RBRACKET?
optionalRBRACKET?:IToken[]
secondTerm?
optionalsecondTerm?:TermCstNode[]
subject?
optionalsubject?:TermCstNode[]
ExistsClauseCstChildren
ExistsClauseCstChildren =
object
Properties
COMMA?
optionalCOMMA?:IToken[]
EXISTS
EXISTS:
IToken[]
IN
IN:
IToken[]
VARIABLE
VARIABLE:
IToken[]
ExpressionAggregateBinding
ExpressionAggregateBinding =
AggregateBindingTarget&object
Type Declaration
distinct?
optionaldistinct?:never
expression
expression:
DatalogExpression
function?
optionalfunction?:never
percentile?
optionalpercentile?:never
secondExpression?
optionalsecondExpression?:never
ExpressionCstChildren
ExpressionCstChildren =
object
Properties
conditionalOrExpression
conditionalOrExpression:
ConditionalOrExpressionCstNode[]
FilterAtomCstChildren
FilterAtomCstChildren =
object
Properties
expression
expression:
ExpressionCstNode[]
FILTER
FILTER:
IToken[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
FunctionCallCstChildren
FunctionCallCstChildren =
object
Properties
argumentList?
optionalargumentList?:ArgumentListCstNode[]
concatFunction?
optionalconcatFunction?:ConcatFunctionCstNode[]
ifFunction?
optionalifFunction?:IfFunctionCstNode[]
iri?
optionaliri?:IriCstNode[]
iriFunction?
optionaliriFunction?:IriFunctionCstNode[]
LPAREN?
optionalLPAREN?:IToken[]
regexFunction?
optionalregexFunction?:RegexFunctionCstNode[]
roundFunction?
optionalroundFunction?:RoundFunctionCstNode[]
RPAREN?
optionalRPAREN?:IToken[]
skolemFunction?
optionalskolemFunction?:SkolemFunctionCstNode[]
strFunction?
optionalstrFunction?:StrFunctionCstNode[]
FunctionCallExpression
FunctionCallExpression =
object
Properties
args
args:
DatalogExpression[]
name
name:
string
type
type:
"function"
GeneralAtom
GeneralAtom =
object
Properties
tableName
tableName:
string
terms
terms:
DatalogTerm[]
type
type:
"general"
GeneralAtomCstChildren
GeneralAtomCstChildren =
object
Properties
COMMA?
optionalCOMMA?:IToken[]
IDENTIFIER?
optionalIDENTIFIER?:IToken[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
STRING_LITERAL?
optionalSTRING_LITERAL?:IToken[]
term
term:
TermCstNode[]
GraphNameCstChildren
GraphNameCstChildren =
object
Properties
iri?
optionaliri?:IriCstNode[]
VARIABLE?
optionalVARIABLE?:IToken[]
GroundedAsTargetCstChildren
GroundedAsTargetCstChildren =
object
Properties
BLANK_NODE?
optionalBLANK_NODE?:IToken[]
iri?
optionaliri?:IriCstNode[]
literal?
optionalliteral?:LiteralCstNode[]
GroundedDatalogRule
GroundedDatalogRule =
DatalogRule&object
A rule AST produced by parseGroundedDatalogRule — not safe for SPARQL translation.
Type Declaration
grounded
readonlygrounded:true
IfFunctionCstChildren
IfFunctionCstChildren =
object
Properties
COMMA
COMMA:
IToken[]
condition
condition:
ExpressionCstNode[]
elseExpr
elseExpr:
ExpressionCstNode[]
IF
IF:
IToken[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
thenExpr
thenExpr:
ExpressionCstNode[]
InExpression
InExpression =
object
Properties
expression
expression:
DatalogExpression
list
list:
DatalogExpression[]
negated
negated:
boolean
type
type:
"in"
InferenceVerificationResult
InferenceVerificationResult =
object
Properties
candidateQuery?
optionalcandidateQuery?:string
error?
optionalerror?:string
sparqlQuery?
optionalsparqlQuery?:string
testTriple?
optionaltestTriple?:object
object
object:
string
predicate
predicate:
string
subject
subject:
string
verified
verified:
boolean
IriCstChildren
IriCstChildren =
object
Properties
DEFAULT_NS_IRI?
optionalDEFAULT_NS_IRI?:IToken[]
IDENTIFIER?
optionalIDENTIFIER?:IToken[]
INTERNAL_FUNCTION?
optionalINTERNAL_FUNCTION?:IToken[]
IRI_REF?
optionalIRI_REF?:IToken[]
PREFIX_ONLY?
optionalPREFIX_ONLY?:IToken[]
PREFIXED_NAME?
optionalPREFIXED_NAME?:IToken[]
IriFunctionCstChildren
IriFunctionCstChildren =
object
Properties
baseIri?
optionalbaseIri?:ExpressionCstNode[]
COMMA?
optionalCOMMA?:IToken[]
IRI
IRI:
IToken[]
iriExpr
iriExpr:
ExpressionCstNode[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
IriTerm
IriTerm =
object
Properties
prefixed
prefixed:
boolean
type
type:
"iri"
value
value:
string
LiteralCstChildren
LiteralCstChildren =
object
Properties
booleanLiteral?
optionalbooleanLiteral?:BooleanLiteralCstNode[]
numericLiteral?
optionalnumericLiteral?:NumericLiteralCstNode[]
stringLiteral?
optionalstringLiteral?:StringLiteralCstNode[]
LiteralSetComparison
LiteralSetComparison =
object
Properties
literals
literals:
LiteralTerm[]
negated
negated:
boolean
subject
subject:
DatalogTerm
LiteralTerm
LiteralTerm =
object
Properties
datatype?
optionaldatatype?:string
language?
optionallanguage?:string
termSpan?
optionaltermSpan?:SourceSpan
type
type:
"literal"
value
value:
string
valueSpan?
optionalvalueSpan?:SourceSpan
MultiplicativeExpressionCstChildren
MultiplicativeExpressionCstChildren =
object
Properties
SLASH?
optionalSLASH?:IToken[]
STAR?
optionalSTAR?:IToken[]
unaryExpression
unaryExpression:
UnaryExpressionCstNode[]
NegationCstChildren
NegationCstChildren =
object
Properties
bodyFormulaList?
optionalbodyFormulaList?:BodyFormulaListCstNode[]
existsClause?
optionalexistsClause?:ExistsClauseCstNode[]
LPAREN?
optionalLPAREN?:IToken[]
NOT
NOT:
IToken[]
RPAREN?
optionalRPAREN?:IToken[]
tupleTableAtom?
optionaltupleTableAtom?:TupleTableAtomCstNode[]
NumericLiteralCstChildren
NumericLiteralCstChildren =
object
Properties
DECIMAL?
optionalDECIMAL?:IToken[]
DOUBLE?
optionalDOUBLE?:IToken[]
INTEGER?
optionalINTEGER?:IToken[]
OnClauseCstChildren
OnClauseCstChildren =
object
Properties
groundedAsTarget?
optionalgroundedAsTarget?:GroundedAsTargetCstNode[]
ON
ON:
IToken[]
VARIABLE?
optionalVARIABLE?:IToken[]
PercentileAggregateBinding
PercentileAggregateBinding =
AggregateBindingTarget&object
Type Declaration
distinct?
optionaldistinct?:boolean
expression
expression:
DatalogExpression
function
function:
PercentileAggregateFunction
percentile
percentile:
string
The PERCENTILE="…" parameter’s decimal text, in [0, 1].
secondExpression?
optionalsecondExpression?:never
PercentileAggregateFunction
PercentileAggregateFunction =
"PERCENTILE_CONT"|"PERCENTILE_DISC"
PercentileFunctionCstChildren
PercentileFunctionCstChildren =
object
Properties
DISTINCT?
optionalDISTINCT?:IToken[]
EQUALS
EQUALS:
IToken[]
expression
expression:
ExpressionCstNode[]
LPAREN
LPAREN:
IToken[]
PERCENTILE
PERCENTILE:
IToken[]
PERCENTILE_CONT?
optionalPERCENTILE_CONT?:IToken[]
PERCENTILE_DISC?
optionalPERCENTILE_DISC?:IToken[]
RPAREN
RPAREN:
IToken[]
SEMICOLON
SEMICOLON:
IToken[]
STRING_LITERAL
STRING_LITERAL:
IToken[]
PredicateEvidence
PredicateEvidence =
object
Properties
position
position:
PredicatePosition
term
term:
string
PredicatePosition
PredicatePosition =
"domain"|"range"
PrimaryExpressionCstChildren
PrimaryExpressionCstChildren =
object
Properties
BLANK_NODE?
optionalBLANK_NODE?:IToken[]
expression?
optionalexpression?:ExpressionCstNode[]
functionCall?
optionalfunctionCall?:FunctionCallCstNode[]
iri?
optionaliri?:IriCstNode[]
literal?
optionalliteral?:LiteralCstNode[]
LPAREN?
optionalLPAREN?:IToken[]
RPAREN?
optionalRPAREN?:IToken[]
VARIABLE?
optionalVARIABLE?:IToken[]
PropertyAssertion
PropertyAssertion =
object
Properties
graph?
optionalgraph?:DatalogTerm
object
object:
DatalogTerm
predicate
predicate:
string
subject
subject:
DatalogTerm
PropertyAtom
PropertyAtom =
object
Properties
graph?
optionalgraph?:DatalogTerm
object
object:
DatalogTerm
predicate
predicate:
string
subject
subject:
DatalogTerm
type
type:
"property"
ReadOnlySparqlOptions
ReadOnlySparqlOptions =
object
Properties
defaults?
optionaldefaults?:SparqlParseDefaults
federation?
optionalfederation?:SparqlFederationPolicy
RegexFunctionCstChildren
RegexFunctionCstChildren =
object
Properties
COMMA
COMMA:
IToken[]
flagsExpr?
optionalflagsExpr?:ExpressionCstNode[]
LPAREN
LPAREN:
IToken[]
patternExpr
patternExpr:
ExpressionCstNode[]
REGEX
REGEX:
IToken[]
RPAREN
RPAREN:
IToken[]
textExpr
textExpr:
ExpressionCstNode[]
RelationalExpressionCstChildren
RelationalExpressionCstChildren =
object
Properties
additiveExpression
additiveExpression:
AdditiveExpressionCstNode[]
argumentList?
optionalargumentList?:ArgumentListCstNode[]
EQUALS?
optionalEQUALS?:IToken[]
GREATER_THAN?
optionalGREATER_THAN?:IToken[]
GREATER_THAN_OR_EQUAL?
optionalGREATER_THAN_OR_EQUAL?:IToken[]
IN?
optionalIN?:IToken[]
LESS_THAN?
optionalLESS_THAN?:IToken[]
LESS_THAN_OR_EQUAL?
optionalLESS_THAN_OR_EQUAL?:IToken[]
LPAREN?
optionalLPAREN?:IToken[]
NOT?
optionalNOT?:IToken[]
NOT_EQUALS?
optionalNOT_EQUALS?:IToken[]
RPAREN?
optionalRPAREN?:IToken[]
ResolvableTerm
ResolvableTerm =
object
Properties
domainIncludes
domainIncludes:
string[]
rangeIncludes
rangeIncludes:
string[]
RoundFunctionCstChildren
RoundFunctionCstChildren =
object
Properties
expression
expression:
ExpressionCstNode[]
LPAREN
LPAREN:
IToken[]
ROUND
ROUND:
IToken[]
RPAREN
RPAREN:
IToken[]
RuleBodyCstChildren
RuleBodyCstChildren =
object
Properties
bodyFormula
bodyFormula:
BodyFormulaCstNode[]
COMMA?
optionalCOMMA?:IToken[]
RuleCstChildren
RuleCstChildren =
object
Properties
DOT
DOT:
IToken[]
RULE_ARROW
RULE_ARROW:
IToken[]
ruleBody?
optionalruleBody?:RuleBodyCstNode[]
ruleHead
ruleHead:
RuleHeadCstNode[]
RuleHeadCstChildren
RuleHeadCstChildren =
object
Properties
COMMA?
optionalCOMMA?:IToken[]
tupleTableAtom
tupleTableAtom:
TupleTableAtomCstNode[]
RuleVocabulary
RuleVocabulary =
object
Properties
body
body:
RuleVocabularyPosition
head
head:
RuleVocabularyPosition
RuleVocabularyExtractionResult
RuleVocabularyExtractionResult = {
ok:true;vocabulary:RuleVocabulary; } | {issues:DatalogParseIssue[];ok:false; }
RuleVocabularyPosition
RuleVocabularyPosition =
object
Properties
classes
classes:
RuleVocabularyReference[]
predicates
predicates:
RuleVocabularyReference[]
RuleVocabularyReference
RuleVocabularyReference =
object
Properties
graph?
optionalgraph?:DatalogTerm
term
term:
string
SimpleComparison
SimpleComparison =
object
Properties
literal
literal:
LiteralTerm
operator
operator:
ComparisonOperator
variableName
variableName:
string
SkolemAtomCstChildren
SkolemAtomCstChildren =
object
Properties
argumentList
argumentList:
ArgumentListCstNode[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
SKOLEM
SKOLEM:
IToken[]
SkolemFunctionCstChildren
SkolemFunctionCstChildren =
object
Properties
argumentList
argumentList:
ArgumentListCstNode[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
SKOLEM
SKOLEM:
IToken[]
SourceSpan
SourceSpan =
object
Properties
end
end:
number
start
start:
number
SparqlExplicitTriple
SparqlExplicitTriple =
SparqlTriple&object
Type Declaration
explicit?
optionalexplicit?:SparqlTerm
SparqlExpression
SparqlExpression =
ExpressionOperation|ExpressionPatternOperation|ExpressionFunctionCall|ExpressionAggregate|SparqlTermIri|SparqlTermVariable|TermLiteral
SparqlFederationPolicy
SparqlFederationPolicy =
object
Properties
allowedEndpoints
allowedEndpoints: readonly
string[]
allowedPrefixes?
optionalallowedPrefixes?: readonlystring[]
gatewayEndpoints?
optionalgatewayEndpoints?:boolean
maxServices?
optionalmaxServices?:number
reservedOrigins?
optionalreservedOrigins?: readonlystring[]
SparqlFederationResult
SparqlFederationResult = {
allowed:true;endpoints:string[];gatewayed:string[]; } | {allowed:false;endpoint?:string;error:string; }
SparqlGraphNode
SparqlGraphNode =
SparqlTerm|SparqlTripleCollection
SparqlParseDefaults
SparqlParseDefaults =
object
Properties
baseIRI?
optionalbaseIRI?:string
prefixes?
optionalprefixes?:Record<string,string>
SparqlPath
SparqlPath =
SparqlTermIri|PropertyPathChain|PathModified|PathNegated
SparqlPattern
SparqlPattern =
SparqlPatternBgp|SparqlPatternGroup|PatternUnion|PatternOptional|PatternMinus|PatternGraph|PatternService|SparqlPatternFilter|PatternBind|PatternValues|SubSelect
SparqlPatternBgp
SparqlPatternBgp =
PatternBase&object
Type Declaration
subType
subType:
"bgp"
triples
triples:
BasicGraphPattern
Only the first appearance of a subject and predicate have a string manifestation
SparqlPatternFilter
SparqlPatternFilter =
PatternBase&object
Type Declaration
expression
expression:
SparqlExpression
subType
subType:
"filter"
SparqlPatternGroup
SparqlPatternGroup =
PatternBase&object
Type Declaration
patterns
patterns:
SparqlPattern[]
subType
subType:
"group"
SparqlQuads
SparqlQuads =
SparqlPatternBgp|GraphQuads
SparqlQuery
SparqlQuery =
SparqlQueryNode|SparqlUpdate
SparqlQueryNode
SparqlQueryNode =
QuerySelect|QueryConstruct|QueryDescribe|QueryAsk
SparqlQueryType
SparqlQueryType =
"select"|"construct"|"describe"|"ask"|"update"
SparqlScope
SparqlScope =
object
Properties
baseIRI
baseIRI:
string|undefined
prefixes
prefixes:
Record<string,string>
SparqlTerm
SparqlTerm =
GraphTerm|SparqlTermVariable
SparqlTermBlank
SparqlTermBlank =
TermBase&object&object
Type Declaration
subType
subType:
"blankNode"
label
label:
string
SparqlTermIri
SparqlTermIri =
TermIriFull|TermIriPrefixed
SparqlTermVariable
SparqlTermVariable =
TermBase&object
Type Declaration
subType
subType:
"variable"
value
value:
string
SparqlTriple
SparqlTriple =
Node&object
Type Declaration
object
object:
SparqlGraphNode
predicate
predicate:
SparqlTermIri|SparqlTermVariable|SparqlPath
subject
subject:
SparqlGraphNode
type
type:
"triple"
SparqlTripleCollection
SparqlTripleCollection =
TripleCollectionList|TripleCollectionBlankNodeProperties
SparqlUpdate
SparqlUpdate =
Node&object
Type Declaration
type
type:
"update"
updates
updates:
object[]
SparqlUpdateOperation
SparqlUpdateOperation =
UpdateOperationLoad|UpdateOperationClear|UpdateOperationDrop|UpdateOperationCreate|UpdateOperationAdd|UpdateOperationMove|UpdateOperationCopy|UpdateOperationInsertData|UpdateOperationDeleteData|UpdateOperationDeleteWhere|UpdateOperationModify
SparqlUpdateValidationResult
SparqlUpdateValidationResult = {
allowed:true;operationTypes:DataManipulationSubType[]; } | {allowed:false;blockedOperations?:UpdateSubType[];error:string; }
SparqlValidationResult
SparqlValidationResult = {
isReadOnly:boolean;queryType:SparqlQueryType;valid:true; } | {error:string;valid:false; }
StrFunctionCstChildren
StrFunctionCstChildren =
object
Properties
expression
expression:
ExpressionCstNode[]
LPAREN
LPAREN:
IToken[]
RPAREN
RPAREN:
IToken[]
STR
STR:
IToken[]
StringLiteralCstChildren
StringLiteralCstChildren =
object
Properties
HAT?
optionalHAT?:IToken[]
iri?
optionaliri?:IriCstNode[]
LANGTAG?
optionalLANGTAG?:IToken[]
STRING_LITERAL?
optionalSTRING_LITERAL?:IToken[]
STRING_LITERAL_LONG?
optionalSTRING_LITERAL_LONG?:IToken[]
TermCstChildren
TermCstChildren =
object
Properties
BLANK_NODE?
optionalBLANK_NODE?:IToken[]
iri?
optionaliri?:IriCstNode[]
literal?
optionalliteral?:LiteralCstNode[]
VARIABLE?
optionalVARIABLE?:IToken[]
TermExpression
TermExpression =
object
Properties
term
term:
DatalogTerm
type
type:
"term"
TripleAtom
TripleAtom =
object
Properties
graph?
optionalgraph?:DatalogTerm
object
object:
DatalogTerm
predicate
predicate:
DatalogTerm
subject
subject:
DatalogTerm
type
type:
"triple"
TupleTableAtomCstChildren
TupleTableAtomCstChildren =
object
Properties
defaultGraphAtom?
optionaldefaultGraphAtom?:DefaultGraphAtomCstNode[]
generalAtom?
optionalgeneralAtom?:GeneralAtomCstNode[]
graph?
optionalgraph?:GraphNameCstNode[]
UnaryAggregateBinding
UnaryAggregateBinding =
AggregateBindingTarget&object
Type Declaration
distinct?
optionaldistinct?:boolean
expression
expression:
DatalogExpression|"*"
function
function:
UnaryAggregateFunction
percentile?
optionalpercentile?:never
secondExpression?
optionalsecondExpression?:never
UnaryAggregateFunction
UnaryAggregateFunction =
"COUNT"|"MIN"|"MAX"|"SUM"|"MUL"|"AVG"|"COUNT_MIN"|"COUNT_MAX"|"VAR_POP"|"VAR_SAMP"|"STDDEV_POP"|"STDDEV_SAMP"|"MODE"
UnaryExpression
UnaryExpression =
object
Properties
operand
operand:
DatalogExpression
operator
operator:
"!"|"+"|"-"
type
type:
"unary"
UnaryExpressionCstChildren
UnaryExpressionCstChildren =
object
Properties
EXCLAMATION?
optionalEXCLAMATION?:IToken[]
MINUS?
optionalMINUS?:IToken[]
PLUS?
optionalPLUS?:IToken[]
primaryExpression
primaryExpression:
PrimaryExpressionCstNode[]
UpdateSubType
UpdateSubType =
SparqlUpdateOperation["subType"]
VariableTerm
VariableTerm =
object
Properties
name
name:
string
type
type:
"variable"
VariableType
VariableType =
object
Properties
source
source:
VariableTypeSource
typeTerm
typeTerm:
string
variable
variable:
string
VariableTypeEvidence
VariableTypeEvidence =
object
Properties
bodyClassTerm?
optionalbodyClassTerm?:string
classTerm?
optionalclassTerm?:string
predicateEvidence
predicateEvidence:
PredicateEvidence[]
variable
variable:
string
VariableTypeSource
VariableTypeSource =
"class"|PredicatePosition
XsdDatatypeLocalName
XsdDatatypeLocalName = keyof typeof
xsdDatatypes
Variables
AGGREGATE
constAGGREGATE:TokenType
allTokens
constallTokens:TokenType[]
AND
constAND:TokenType
AS
constAS:TokenType
AT
constAT:TokenType
AVG
constAVG:TokenType
BaseDatalogVisitor
constBaseDatalogVisitor: new (…args) =>ICstVisitor<any,any>
Parameters
args
…any[]
Returns
ICstVisitor<any, any>
BIND
constBIND:TokenType
BLANK_NODE
constBLANK_NODE:TokenType
booleanLiteralTokenTypes
constbooleanLiteralTokenTypes:Set<TokenType>
builtinFunctionTokenTypes
constbuiltinFunctionTokenTypes:Set<TokenType>
COMMA
constCOMMA:TokenType
COMMENT
constCOMMENT:TokenType
CONCAT
constCONCAT:TokenType
COUNT
constCOUNT:TokenType
COUNT_MAX
constCOUNT_MAX:TokenType
COUNT_MIN
constCOUNT_MIN:TokenType
DECIMAL
constDECIMAL:TokenType
DEFAULT_NS_IRI
constDEFAULT_NS_IRI:TokenType
delimiterTokenTypes
constdelimiterTokenTypes:Set<TokenType>
DISTINCT
constDISTINCT:TokenType
DOT
constDOT:TokenType
DOUBLE
constDOUBLE:TokenType
EQUALS
constEQUALS:TokenType
EXCLAMATION
constEXCLAMATION:TokenType
EXISTS
constEXISTS:TokenType
FALSE
constFALSE:TokenType
FILTER
constFILTER:TokenType
GREATER_THAN
constGREATER_THAN:TokenType
GREATER_THAN_OR_EQUAL
constGREATER_THAN_OR_EQUAL:TokenType
HAT
constHAT:TokenType
IDENTIFIER
constIDENTIFIER:TokenType
IF
constIF:TokenType
IN
constIN:TokenType
INTEGER
constINTEGER:TokenType
INTERNAL_FUNCTION
constINTERNAL_FUNCTION:TokenType
IRI
constIRI:TokenType
IRI_REF
constIRI_REF:TokenType
iriBodyCharClass
constiriBodyCharClass: “[^\\s<>\”{}|^`\\\\]” = ‘[^\\s<>“{}|^`\\\\]’
iriTokenTypes
constiriTokenTypes:Set<TokenType>
keywordTokenTypes
constkeywordTokenTypes:Set<TokenType>
LANGTAG
constLANGTAG:TokenType
LBRACKET
constLBRACKET:TokenType
LESS_THAN
constLESS_THAN:TokenType
LESS_THAN_OR_EQUAL
constLESS_THAN_OR_EQUAL:TokenType
LPAREN
constLPAREN:TokenType
MAX
constMAX:TokenType
MAX_ARGMAX
constMAX_ARGMAX:TokenType
MAX_ARGMIN
constMAX_ARGMIN:TokenType
MIN
constMIN:TokenType
MIN_ARGMAX
constMIN_ARGMAX:TokenType
MIN_ARGMIN
constMIN_ARGMIN:TokenType
MINUS
constMINUS:TokenType
MODE
constMODE:TokenType
MUL
constMUL:TokenType
namedGraphWriteMessage
constnamedGraphWriteMessage:"This write may change only the default graph: GRAPH, WITH and USING are not permitted."="This write may change only the default graph: GRAPH, WITH and USING are not permitted."
noFederation
constnoFederation:SparqlFederationPolicy
NOT
constNOT:TokenType
NOT_EQUALS
constNOT_EQUALS:TokenType
numericLiteralTokenTypes
constnumericLiteralTokenTypes:Set<TokenType>
ON
constON:TokenType
operatorTokenTypes
constoperatorTokenTypes:Set<TokenType>
OR
constOR:TokenType
PERCENTILE
constPERCENTILE:TokenType
PERCENTILE_CONT
constPERCENTILE_CONT:TokenType
PERCENTILE_DISC
constPERCENTILE_DISC:TokenType
PLUS
constPLUS:TokenType
PREFIX_ONLY
constPREFIX_ONLY:TokenType
PREFIXED_NAME
constPREFIXED_NAME:TokenType
RBRACKET
constRBRACKET:TokenType
REGEX
constREGEX:TokenType
ROUND
constROUND:TokenType
RPAREN
constRPAREN:TokenType
RULE_ARROW
constRULE_ARROW:TokenType
SEMICOLON
constSEMICOLON:TokenType
serviceInUpdateMessage
constserviceInUpdateMessage:"SERVICE federation is not allowed in an update: a write may read only this datastore."="SERVICE federation is not allowed in an update: a write may read only this datastore."
SKOLEM
constSKOLEM:TokenType
SLASH
constSLASH:TokenType
sparqlAstFactory
constsparqlAstFactory:AstFactory
STAR
constSTAR:TokenType
STDDEV_POP
constSTDDEV_POP:TokenType
STDDEV_SAMP
constSTDDEV_SAMP:TokenType
STR
constSTR:TokenType
STRING_LITERAL
constSTRING_LITERAL:TokenType
STRING_LITERAL_LONG
constSTRING_LITERAL_LONG:TokenType
stringLiteralTokenTypes
conststringLiteralTokenTypes:Set<TokenType>
SUM
constSUM:TokenType
termTokenTypes
consttermTokenTypes:Set<TokenType>
TRUE
constTRUE:TokenType
VAR_POP
constVAR_POP:TokenType
VAR_SAMP
constVAR_SAMP:TokenType
VARIABLE
constVARIABLE:TokenType
WHITESPACE
constWHITESPACE:TokenType
xsdDatatypes
constxsdDatatypes:object
Type Declaration
boolean
readonlyboolean:"xsd:boolean"="xsd:boolean"
date
readonlydate:"xsd:date"="xsd:date"
dateTime
readonlydateTime:"xsd:dateTime"="xsd:dateTime"
decimal
readonlydecimal:"xsd:decimal"="xsd:decimal"
double
readonlydouble:"xsd:double"="xsd:double"
integer
readonlyinteger:"xsd:integer"="xsd:integer"
string
readonlystring:"xsd:string"="xsd:string"
Functions
areRulesEquivalent()
areRulesEquivalent(
rule1,rule2):boolean
Check if two rules are semantically equivalent (ignoring whitespace)
Parameters
rule1
string
rule2
string
Returns
boolean
assertNoGroundedTargets()
assertNoGroundedTargets(
body):void
Parameters
body
Returns
void
astBuilder()
astBuilder():
DatalogAstBuilder
Returns
atomToDatalogText()
atomToDatalogText(
atom,options?):string
Parameters
atom
options?
DatalogTextOptions = {}
Returns
string
binaryOperandNeedsParentheses()
binaryOperandNeedsParentheses(
operand,parentOperator,side):boolean
Parameters
operand
parentOperator
"*" | “||” | "&&" | "=" | "!=" | "<" | ">" | "<=" | ">=" | "+" | "-" | "/"
side
"left" | "right"
Returns
boolean
canonicalRuleText()
canonicalRuleText(
rule):string
Parameters
rule
string
Returns
string
checkSparqlFederation()
checkSparqlFederation(
ast,policy,defaults?):SparqlFederationResult
Parameters
ast
policy
defaults?
SparqlParseDefaults = {}
Returns
classAssertionFromAtom()
classAssertionFromAtom(
atom):ClassAssertion|null
Parameters
atom
Returns
ClassAssertion | null
collectVariableTypeEvidence()
collectVariableTypeEvidence(
ast):VariableTypeEvidence[]
Parameters
ast
Returns
datalogBodyToSparqlSelect()
datalogBodyToSparqlSelect(
bodyFormulas,prefixes?):SparqlSelectResult
Parameters
bodyFormulas
prefixes?
Record<string, string>
Returns
datatypeToTermText()
datatypeToTermText(
datatype):string
Parameters
datatype
string
Returns
string
expandedParserInstance()
expandedParserInstance():
ExpandedDatalogParser
Returns
explainInferenceFailure()
explainInferenceFailure(
result):string
Generate meaningful error messages for inference verification failures
Parameters
result
Returns
string
expressionToDatalogParts()
expressionToDatalogParts(
expression,options?):DatalogTextPart[]
Parameters
expression
options?
DatalogTextOptions = {}
Returns
expressionToDatalogText()
expressionToDatalogText(
expression,options?):string
Parameters
expression
options?
DatalogTextOptions = {}
Returns
string
extractRuleVocabulary()
extractRuleVocabulary(
ruleText):RuleVocabularyExtractionResult
Parameters
ruleText
string
Returns
RuleVocabularyExtractionResult
extractRuleVocabularyFromAst()
extractRuleVocabularyFromAst(
rule):RuleVocabulary
Parameters
rule
Returns
extractRuleVocabularyFromAtom()
extractRuleVocabularyFromAtom(
atom):RuleVocabularyPosition
Parameters
atom
Returns
extractVariables()
extractVariables(
rule):string[]
Parameters
rule
Returns
string[]
flattenTriples()
flattenTriples(
block):SparqlTriple[]
Parameters
block
BasicGraphPattern
Returns
formulaContainsSkolem()
formulaContainsSkolem(
formula):boolean
Parameters
formula
Returns
boolean
formulaSourceTexts()
formulaSourceTexts(
rule):DatalogRuleSourceTexts|undefined
Parameters
rule
Returns
DatalogRuleSourceTexts | undefined
generateSparql()
generateSparql(
ast):string
Parameters
ast
Returns
string
getAggregateFunction()
getAggregateFunction(
binding):UnaryAggregateFunction|BinaryAggregateFunction|PercentileAggregateFunction|undefined
Parameters
binding
Returns
UnaryAggregateFunction | BinaryAggregateFunction | PercentileAggregateFunction | undefined
getAtomType()
getAtomType(
atom):string
Parameters
atom
Returns
string
getExpressionType()
getExpressionType(
expr):string
Parameters
expr
Returns
string
getRelatedVariables()
getRelatedVariables(
rule,targetVariableName):Set<string>
Parameters
rule
targetVariableName
string
Returns
Set<string>
getTermType()
getTermType(
term):string
Parameters
term
Returns
string
getVariablesFromAtom()
getVariablesFromAtom(
atom):VariableTerm[]
Parameters
atom
Returns
getVariablesFromAtomIncludingGraph()
getVariablesFromAtomIncludingGraph(
atom):VariableTerm[]
Parameters
atom
Returns
invertComparisonOperator()
invertComparisonOperator(
operator):ComparisonOperator
Parameters
operator
Returns
isAggregateFormula()
isAggregateFormula(
formula):formula is DatalogAggregate
Parameters
formula
Returns
formula is DatalogAggregate
isBareNumericLiteral()
isBareNumericLiteral(
literal):boolean
Parameters
literal
Returns
boolean
isBinaryExpression()
isBinaryExpression(
expr):expr is BinaryExpression
Parameters
expr
Returns
expr is BinaryExpression
isBindFormula()
isBindFormula(
formula):formula is DatalogBind
Parameters
formula
Returns
formula is DatalogBind
isBlankNodeTerm()
isBlankNodeTerm(
term):term is BlankNodeTerm
Parameters
term
Returns
term is BlankNodeTerm
isBooleanLiteral()
isBooleanLiteral(
literal):boolean
Parameters
literal
Returns
boolean
isClassAtom()
isClassAtom(
atom):atom is ClassAtom
Parameters
atom
Returns
atom is ClassAtom
isComparisonOperator()
isComparisonOperator(
operator):operator is ComparisonOperator
Parameters
operator
"*" | “||” | "&&" | "=" | "!=" | "<" | ">" | "<=" | ">=" | "+" | "-" | "/"
Returns
operator is ComparisonOperator
isDatalogAtom()
isDatalogAtom(
formula):formula is DatalogAtom
Parameters
formula
Returns
formula is DatalogAtom
isDateLiteral()
isDateLiteral(
literal):boolean
Parameters
literal
Returns
boolean
isDateTimeLiteral()
isDateTimeLiteral(
literal):boolean
Parameters
literal
Returns
boolean
isFilterFormula()
isFilterFormula(
formula):formula is DatalogFilter
Parameters
formula
Returns
formula is DatalogFilter
isFullIri()
isFullIri(
value):boolean
Parameters
value
string
Returns
boolean
isFunctionCallExpression()
isFunctionCallExpression(
expr):expr is FunctionCallExpression
Parameters
expr
Returns
expr is FunctionCallExpression
isGeneralAtom()
isGeneralAtom(
atom):atom is GeneralAtom
Parameters
atom
Returns
atom is GeneralAtom
isIriTerm()
isIriTerm(
term):term is IriTerm
Parameters
term
Returns
term is IriTerm
isLiteralTerm()
isLiteralTerm(
term):term is LiteralTerm
Parameters
term
Returns
term is LiteralTerm
isLogicalOperator()
isLogicalOperator(
operator):boolean
Parameters
operator
"*" | “||” | "&&" | "=" | "!=" | "<" | ">" | "<=" | ">=" | "+" | "-" | "/"
Returns
boolean
isNegationFormula()
isNegationFormula(
formula):formula is DatalogNegation
Parameters
formula
Returns
formula is DatalogNegation
isNumericLiteral()
isNumericLiteral(
literal):boolean
Parameters
literal
Returns
boolean
isNumericLiteralTerm()
isNumericLiteralTerm(
term):term is LiteralTerm
Parameters
term
Returns
term is LiteralTerm
isNumericOperator()
isNumericOperator(
operator):boolean
Parameters
operator
"*" | “||” | "&&" | "=" | "!=" | "<" | ">" | "<=" | ">=" | "+" | "-" | "/"
Returns
boolean
isNumericRdfValue()
isNumericRdfValue(
value):boolean
Parameters
value
string
Returns
boolean
isPropertyAtom()
isPropertyAtom(
atom):atom is PropertyAtom
Parameters
atom
Returns
atom is PropertyAtom
isQueryableTermIri()
isQueryableTermIri(
iri):boolean
Parameters
iri
string
Returns
boolean
isReadOnlySparqlQuery()
isReadOnlySparqlQuery(
query,options?):object
Parameters
query
string
options?
Returns
object
allowed
allowed:
boolean
error?
optionalerror?:string
queryType?
optionalqueryType?:SparqlQueryType
serviceEndpoints?
optionalserviceEndpoints?:string[]
isSkolemFormula()
isSkolemFormula(
formula):formula is DatalogSkolem
Parameters
formula
Returns
formula is DatalogSkolem
isTermExpression()
isTermExpression(
expr):expr is TermExpression
Parameters
expr
Returns
expr is TermExpression
isTripleAtom()
isTripleAtom(
atom):atom is TripleAtom
Parameters
atom
Returns
atom is TripleAtom
isUnaryExpression()
isUnaryExpression(
expr):expr is UnaryExpression
Parameters
expr
Returns
expr is UnaryExpression
isVariableTerm()
isVariableTerm(
term):term is VariableTerm
Parameters
term
Returns
term is VariableTerm
isXsdDatatype()
isXsdDatatype(
datatype,localName):boolean
Parameters
datatype
string | undefined
localName
"string" | "boolean" | "integer" | "decimal" | "double" | "date" | "dateTime"
Returns
boolean
literalSetComparisonFromExpression()
literalSetComparisonFromExpression(
expression):LiteralSetComparison|null
Parameters
expression
Returns
LiteralSetComparison | null
literalToDisplayText()
literalToDisplayText(
literal):string
Parameters
literal
Returns
string
mintedVariable()
mintedVariable(
formula):string|null
Parameters
formula
Returns
string | null
mintedVariableNames()
mintedVariableNames(
rule):Set<string>
The variables a rule mints a new node for. An IRI(...) bind counts only when the head describes the node
and no body atom binds it already, since it otherwise names or checks an existing node.
Parameters
rule
Returns
Set<string>
parseBooleanLiteral()
parseBooleanLiteral(
value):boolean|undefined
Parameters
value
string
Returns
boolean | undefined
parseDatalogRule()
parseDatalogRule(
ruleText):DatalogRule
Parse a Datalog rule string into a type-safe AST
Parameters
ruleText
string
Returns
parseDatalogRuleWithIssues()
parseDatalogRuleWithIssues(
ruleText):DatalogParseResult
Parse a Datalog rule string, returning structured issues with source positions instead of throwing on invalid input
Parameters
ruleText
string
Returns
parseDatalogTermText()
parseDatalogTermText(
termText):DatalogTerm|undefined
Parse a single Datalog term (IRI, literal, blank node, or variable) from its text form.
Fact values reach the UI as Datalog term text rather than bare strings, so rendering one means recovering its structure first: a literal carries quotes and an optional datatype or language suffix around the value to display, while an IRI denotes an entity and is rendered as a chip instead. Literal source spans are relative to the input text.
Returns undefined when the text is not exactly one term.
Parameters
termText
string
Returns
DatalogTerm | undefined
parseGroundedDatalogRule()
parseGroundedDatalogRule(
ruleText):GroundedDatalogRule
Parse a grounded rule returned by the engine, where AS targets have been
substituted with the values they evaluated to. Authored rules must go through
parseDatalogRule so that those substitutions stay invalid.
Parameters
ruleText
string
Returns
parseGroundedRule()
parseGroundedRule(
text):CstNode
Parse a grounded rule and return its CST, accepting values in AS target
position. Use parseRule for anything a human or the agent authored.
Parameters
text
string
Returns
CstNode
parserInstance()
parserInstance():
DatalogParser
Returns
parseRule()
parseRule(
text):CstNode
Parameters
text
string
Returns
CstNode
parseRuleWith()
parseRuleWith(
parser,text):CstNode
Lex and parse text with the given parser instance (strict or expanded).
Parameters
parser
text
string
Returns
CstNode
parseSparql()
parseSparql(
text,defaults?):SparqlQuery
Parameters
text
string
defaults?
SparqlParseDefaults = {}
Returns
plainDecimalText()
plainDecimalText(
value):string
Parameters
value
string
Returns
string
positiveBodyContainsSkolem()
positiveBodyContainsSkolem(
body):boolean
Parameters
body
Returns
boolean
propertyAssertionFromAtom()
propertyAssertionFromAtom(
atom):PropertyAssertion|null
Parameters
atom
Returns
PropertyAssertion | null
resolveSparqlIri()
resolveSparqlIri(
term,scope):string
Parameters
term
scope
Returns
string
resolveVariableTypes()
resolveVariableTypes(
evidence,lookupTerm):VariableType[]
Parameters
evidence
lookupTerm
(term) => ResolvableTerm | undefined
Returns
rewriteServiceEndpoints()
rewriteServiceEndpoints(
ast,targets,defaults?):void
Parameters
ast
targets
ReadonlyMap<string, string>
defaults?
SparqlParseDefaults = {}
Returns
void
ruleSpans()
ruleSpans(
cst):DatalogRuleSpans
Parameters
cst
CstNode
Returns
simpleComparisonFromExpression()
simpleComparisonFromExpression(
expression):SimpleComparison|null
Parameters
expression
Returns
SimpleComparison | null
simpleComparisonFromFilter()
simpleComparisonFromFilter(
filter):SimpleComparison|null
Parameters
filter
Returns
SimpleComparison | null
sparqlRemoteFetchRefusal()
sparqlRemoteFetchRefusal(
sparql,kind,policy?,defaults?):string|undefined
Parameters
sparql
string
kind
"query" | "update"
policy?
SparqlFederationPolicy = noFederation
defaults?
SparqlParseDefaults = {}
Returns
string | undefined
sparqlScope()
sparqlScope(
ast,defaults?):SparqlScope
Parameters
ast
defaults?
SparqlParseDefaults = {}
Returns
termsEqual()
termsEqual(
left,right):boolean
Parameters
left
right
Returns
boolean
termTextsEqual()
termTextsEqual(
left,right):boolean|undefined
Compare two serialized terms by meaning rather than by text, so 1.2,
"1.2"^^xsd:decimal and "1.2"^^<http://www.w3.org/2001/XMLSchema#decimal>
all count as the same value. Returns undefined when either side is not a
single term, so callers can tell “different” apart from “not comparable”.
Prefixed and absolute IRIs are not resolved against each other - normalize
IRIs to one form before calling.
Parameters
left
string
right
string
Returns
boolean | undefined
termToDatalogText()
termToDatalogText(
term,options?):string
Parameters
term
options?
DatalogTextOptions = {}
Returns
string
termToSparql()
termToSparql(
term):string
Parameters
term
Returns
string
tokenizeDatalog()
tokenizeDatalog(
text):ILexingResult
Parameters
text
string
Returns
ILexingResult
unaryOperandNeedsParentheses()
unaryOperandNeedsParentheses(
operand):boolean
Parameters
operand
Returns
boolean
unwrapTermExpression()
unwrapTermExpression(
expression):DatalogTerm|null
Parameters
expression
Returns
DatalogTerm | null
usesSparqlService()
usesSparqlService(
ast):boolean
Parameters
ast
Returns
boolean
validateDatalogRule()
validateDatalogRule(
ruleText):object
Validate Datalog rule syntax and that every required variable is bound.
Parameters
ruleText
string
Returns
object
error?
optionalerror?:string
valid
valid:
boolean
validateDataManipulationUpdate()
validateDataManipulationUpdate(
update,options?):SparqlUpdateValidationResult
Parameters
update
string
options?
Returns
validateRuleSyntax()
validateRuleSyntax(
text):object
Parameters
text
string
Returns
object
error?
optionalerror?:string
valid
valid:
boolean
validateSparqlQuery()
validateSparqlQuery(
query,defaults?):SparqlValidationResult
Parameters
query
string
defaults?
SparqlParseDefaults = {}
Returns
variableNameFromTermExpression()
variableNameFromTermExpression(
expression):string|null
Parameters
expression
Returns
string | null
variableNamesFromAtom()
variableNamesFromAtom(
atom):string[]
Parameters
atom
Returns
string[]
variableNamesFromExpression()
variableNamesFromExpression(
expression):string[]
Parameters
expression
Returns
string[]
verifyRuleInference()
verifyRuleInference(
rule,endpointUrl,datastoreId,authorization,testTriple?):Promise<InferenceVerificationResult>
Verify that a rule produces the expected inference
Parameters
rule
endpointUrl
string
datastoreId
string
authorization
string
testTriple?
object
string
predicate
string
subject
string
Returns
Promise<InferenceVerificationResult>
References
remoteFetchInUpdateMessage
Re-exports remoteFetchInUpdateMessage
remoteFetchKeywords
Re-exports remoteFetchKeywords
RemoteFetchKeywords
Re-exports RemoteFetchKeywords
serviceEndpointOrigin
Re-exports serviceEndpointOrigin
unescapeSparqlCodepoints
Re-exports unescapeSparqlCodepoints