@traqula/generator-sparql-1-2 0.0.1-alpha.176

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2024–now Jitse De Smet
4
+ Comunica Association and Ghent University – imec, Belgium
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ <p align="center">
2
+ <img alt="Traqula logo" width="70%" style="border-radius: 20px" src="/assets/white-on-red/logo-white-on-red-lettered-social.png">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>A query language transpiler framework for JavaScript</strong>
7
+ </p>
8
+
9
+ **WARNING:** V2 will come shortly and will have lots of breaking changes.
10
+
11
+ # Traqula SPARQL 1.2 generator
12
+
13
+ Traqula Generator Sparql 1.2 is a [SPARQL 1.2](https://www.w3.org/TR/sparql12-query/#grammar) query generator for TypeScript.
14
+ It can generate SPARQL given the AST created by [Traqula parser SPARQL 1-2](https://github.com/comunica/traqula/tree/main/engines/parser-sparql-1-2).
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install @traqula/generator-sparql-1-2
20
+ ```
21
+
22
+ or
23
+
24
+ ```bash
25
+ yarn add @traqula/generator-sparql-1-2
26
+ ```
27
+
28
+ ## Import
29
+
30
+ Either through ESM import:
31
+
32
+ ```javascript
33
+ import {Parser} from 'engines/generator-sparql-1-2';
34
+ ```
35
+
36
+ _or_ CJS require:
37
+
38
+ ```javascript
39
+ const Parser = require('engines/generator-sparql-1-2').Parser;
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ This package contains a `Generator` that is able to generate SPARQL 1.2 queries:
45
+
46
+ ```typescript
47
+ const generator = new Generator();
48
+ const abstractSyntaxTree = generator.generate(abstractSyntaxTree);
49
+ ```