# @traqula/rules-sparql-1-2

> Traqula Lexer and Grammar Rules for sparql 1.2

Latest version **1.3.0** (published 2026-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @traqula/rules-sparql-1-2
pnpm add @traqula/rules-sparql-1-2
yarn add @traqula/rules-sparql-1-2
bun add @traqula/rules-sparql-1-2
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2026-09-09 |
| First published | 2025-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^20.19.0 \|\| >=22.12.0 |
| Dependencies | 2 |
| Unpacked size | 361 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Maintainers | rubensworks, jitsedesmet |

## Links

- npm: https://www.npmjs.com/package/@traqula/rules-sparql-1-2
- Repository: https://github.com/comunica/traqula
- Homepage: https://github.com/comunica/traqula#readme
- Issues: https://github.com/comunica/traqula/issues
- npm.io page: https://npm.io/package/@traqula/rules-sparql-1-2

## Dependencies (2)

- [@traqula/core](https://npm.io/package/@traqula/core.md) ^1.3.0
- [@traqula/rules-sparql-1-1](https://npm.io/package/@traqula/rules-sparql-1-1.md) ^1.3.0

## Recent versions

- 1.3.0 (latest) — 2026-09-09
- 1.1.7-alpha.0 (next) — 2026-07-07
- 0.0.1-alpha.10 (canary) — 2025-08-18
- 1.2.1 — 2026-08-27
- 1.2.0 — 2026-08-05
- 1.1.6 — 2026-06-19
- 1.1.4 — 2026-06-10
- 1.1.3 — 2026-06-09
- 1.1.2 — 2026-06-05
- 1.1.1 — 2026-05-09
- 1.1.0 — 2026-04-29
- 1.0.7 — 2026-04-16
- 1.0.6 — 2026-04-09
- 1.0.6-alpha.0 — 2026-04-09
- 1.0.5 — 2026-04-08
- … 37 more at https://npm.io/package/@traqula/rules-sparql-1-2/versions

## README

# Traqula Rules SPARQL 1.2 package

[![npm version](https://badge.fury.io/js/@traqula%2Frules-sparql-1-2.svg)](https://www.npmjs.com/package/@traqula/rules-sparql-1-2)

Traqula rules SPARQL 1.2 contains additional grammar rules, tokens, and AST types required for creating a parser for [SPARQL 1.2](https://www.w3.org/TR/sparql12-query/#grammar), extending the [SPARQL 1.1 rules](../rules-sparql-1-1).

## Installation

```bash
npm install @traqula/rules-sparql-1-2
```

or

```bash
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`](../../engines/parser-sparql-1-2) and [`@traqula/generator-sparql-1-2`](../../engines/generator-sparql-1-2).

For guidance on extending the grammar, see the [guidelines for dependent projects](../../docs/guidelines.md).

---
_Source: https://npm.io/package/@traqula/rules-sparql-1-2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
