grammar-composer 0.2.0 → 0.2.1
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/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -202,12 +202,12 @@ import { buildGrammar } from 'grammar-composer'
|
|
|
202
202
|
|
|
203
203
|
// Build the grammar. 'document' is the starting production.
|
|
204
204
|
//
|
|
205
|
-
// Although `XmlGrammar` is a class, there's no need to instantiatte it,
|
|
205
|
+
// Although `XmlGrammar` is defined as a class, there's no need to instantiatte it,
|
|
206
206
|
// just pass it as it is.
|
|
207
207
|
const grammar = buildGrammar(XmlGrammar, 'document')
|
|
208
208
|
|
|
209
209
|
// Parse the XML string with the built grammar
|
|
210
|
-
const parseTree = grammar.parse(xmlString
|
|
210
|
+
const parseTree = grammar.parse(xmlString)
|
|
211
211
|
```
|
|
212
212
|
|
|
213
213
|
The resulting parse tree looks like:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grammar-composer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Defines and generates parsers from composable grammar definitions. Includes advanced features like lexer-free parsing, selective packrat memoization and static analysis.",
|
|
5
5
|
"author": "Rotem Dan",
|
|
6
6
|
"license": "MIT",
|