npm.io
1.1.6 • Published 1 month ago

@traqula/rules-sparql-1-2

Licence
MIT
Version
1.1.6
Deps
2
Size
361 kB
Vulns
0
Weekly
0
Stars
22

Traqula Rules SPARQL 1.2 package

npm version

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

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.