npm.io
1.1.4 • Published 1 month ago

@traqula/rules-sparql-1-1

Licence
MIT
Version
1.1.4
Deps
2
Size
1.5 MB
Vulns
0
Weekly
0
Stars
22

Traqula Rules SPARQL 1.1

npm version

Traqula rules SPARQL 1.1 contains the grammar rules, lexer tokens, AST types, and factory for building SPARQL 1.1 parsers and generators.

This package is the foundation that the SPARQL 1.2 rules and SPARQL 1.1 + ADJUST rules extend.

Installation

npm install @traqula/rules-sparql-1-1

or

yarn add @traqula/rules-sparql-1-1

Exports

This package provides the following main exports:

Export Description
gram.* Grammar rules for SPARQL 1.1 (query, update, expression, pattern, etc.)
lex.* Lexer tokens and the sparql11LexerBuilder
AstFactory Factory for creating SPARQL 1.1 AST nodes
MinimalSparqlParser Base class for parser engines
completeParseContext Helper to fill in default parse context values
completeGeneratorContext Helper to fill in default generator context values
copyParseContext Helper to shallow-copy a parse context
sparqlCodepointEscape SPARQL codepoint escape preprocessor
AstTransformer Type-safe AST visitor/transformer
CommonIRIs Enum of commonly used IRI constants (XSD, RDF)
Sparql11types TypeScript types for all SPARQL 1.1 AST nodes

Usage

This package is primarily used by engine packages and by dependent projects that extend Traqula's grammar. For end-user parsing and generation, use the engine packages (@traqula/parser-sparql-1-1, @traqula/generator-sparql-1-1) instead.

For guidance on extending grammar rules, see the guidelines for dependent projects and the create a parser documentation.