Traqula Rules SPARQL 1.2 package
Traqula rules SPARQL 1.2 contains additional grammar rules, tokens, and AST types required for creating a parser for SPARQL 1.2, extending the SPARQL 1.1 rules.
Installation
npm install @traqula/rules-sparql-1-2
or
yarn add @traqula/rules-sparql-1-2
Minor versions keep the name, signature and behavior of this package's rules, but can add rules or change how existing rules are implemented, such as which rules they call. This only affects projects that patch, delete or individually register rules. See versioning.
What's added over SPARQL 1.1
This package adds grammar, lexer, and AST type definitions for SPARQL 1.2 features including:
- Reified triples (
<<...>>syntax) and triple terms - Annotations on triples
- VERSION declaration (
VERSION 1.2) - Updated expression, pattern, and term types
Exports
| Export | Description |
|---|---|
gram.* |
SPARQL 1.2 grammar rule patches and additions |
lex.* |
SPARQL 1.2 lexer tokens and sparql12LexerBuilder |
AstFactory |
Extended factory supporting SPARQL 1.2 AST nodes |
Sparql12types |
TypeScript types for all SPARQL 1.2 AST nodes |
completeParseContext, copyParseContext |
Context helpers (SPARQL 1.2 version) |
validators |
SPARQL 1.2 specific validation functions |
Usage
This package is primarily used by engine packages. For end-user parsing and generation, use @traqula/parser-sparql-1-2 and @traqula/generator-sparql-1-2.
For guidance on extending the grammar, see the guidelines for dependent projects.