@traqula/rules-sparql-1-2
v1.1.6
Published
Traqula Lexer and Grammar Rules for sparql 1.2
Readme
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-2or
yarn add @traqula/rules-sparql-1-2What'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.
