mpw / glush

A parser toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Glush: A parser toolkit

Glush is a versatile parser toolkit:

  • Generates JavaScript parsers.

  • Usable as a parser combinator library in Ruby.

  • Parses LL/LR grammars in linear time.

  • Parses all context-free grammars (even the most ambiguous ones) in worst-case cubic time.

  • Scannerless: Works directly on characters (no lexer needed).

  • Streamable, push-based API: You give it one token at a time; fail-fast supported.

  • Reads EBNF grammars.

  • Flexible operator precedence.

  • Licensed under 0BSD.

Status

Glush is, as of late 2019, under active development with changes being made to the core algorithm in the v2 branch. The code in the master branch is usable, but has known deficiencies. For now it’s recommended to wait until the new implementation stabilizes and as such there is limited documentation and examples.

Planned features

  • Restructuring of the parser algorithm.

  • Documentation of EBNF format.

  • Command-line tool for parsing EBNF grammars and generating parsers.

  • Improved handling of ambiguity.

  • Generating Go parser.

About

A parser toolkit

License:BSD Zero Clause License


Languages

Language:Ruby 99.2%Language:Python 0.8%