# @traqula/rules-sparql-1-1

> TRAQULA Lexer and Grammar Rules for sparql 1.1

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

## Install

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

## 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 | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Maintainers | rubensworks, jitsedesmet |

## Links

- npm: https://www.npmjs.com/package/@traqula/rules-sparql-1-1
- 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-1

## Dependencies (2)

- [@traqula/core](https://npm.io/package/@traqula/core.md) ^1.3.0
- [@traqula/chevrotain](https://npm.io/package/@traqula/chevrotain.md) ^1.1.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.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
- 1.0.4 — 2026-03-25
- … 36 more at https://npm.io/package/@traqula/rules-sparql-1-1/versions

## README

# Traqula Rules SPARQL 1.1

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

Traqula rules SPARQL 1.1 contains the grammar rules, lexer tokens, AST types, and factory for building [SPARQL 1.1](https://www.w3.org/TR/sparql11-query/#grammar) parsers and generators.

This package is the foundation that the [SPARQL 1.2 rules](../rules-sparql-1-2) and [SPARQL 1.1 + ADJUST rules](../rules-sparql-1-1-adjust) extend.

## Installation

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

or

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

For guidance on extending grammar rules, see the [guidelines for dependent projects](../../docs/guidelines.md) and the [create a parser](../../docs/modifications/create-parser.md) documentation.

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