@gram-data/gram-parse
v0.3.11
Published
parse text into gram data graphs
Downloads
20
Readme
From text literal (a)-->(b)
to a gram AST.
How to gram-parse
Install:
npm install @gram-data/gram-parse
Parse text into an AST:
import { toAST } from '@gram-data/gram-parse';
const src = '(a)-->(b)';
const parsed = toAST(src);
Inspect AST using unist-util-inspect:
const inspect = require('unist-util-inspect');
console.log(inspect(parsed));
Next Steps
- Transform to js objects using [[gram-value]]
- Write back to a string using [[gram-stringify]]
- Introspect the AST using [[gram-ast]]