@warfley/node-gold-engine
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Node GOLD Engine

This is an engine for the GOLD Parsing System (http://goldparser.org/) written in typescript for node.js.

The engine was developed as part of the gold-parser-tools VSCode extension (https://github.com/Warfley/gold-parser-tools).

Features

  • v1.0 and v5.0 support
  • build parsing tree for grammar
  • event based hooking points on shift, reduce and lexical analysis

Example Usage:

  let grammar_reader = await GTFileReader.from_file(cgt_file);
  let grammar_tables = load_grammar_tables(grammar_reader);

  let parse_result = await parse_string(input_text, grammar_tables.dfa, grammar_tables.lalr,
                                        on_lex, on_reduce, on_shift);
  print_parse_tree(parse_result);

Documentation

Currently no documentation available specifically for the node engine.

For general engine design and how to construct your own engine check out https://github.com/Warfley/goldengine/docs

Package Sidebar

Install

npm i @warfley/node-gold-engine

Weekly Downloads

0

Version

0.0.5

License

BSD-3-Clause

Unpacked Size

75.5 kB

Total Files

19

Last publish

Collaborators

  • warfley