Exherbo
GitLab
Packages
sys-devel/elkhound
A parser generator capable of emitting a GLR parser in OCaml.
Versions
Slot
Version
Repository
Platforms
0
2019.08.25
heirecka
~amd64
arm?
armv7?
armv8?
x86?
Metadata
Homepage
(
https://github.com/WeiDUorg/elkhound
https://scottmcpeak.com/elkhound/
)
Summary
A parser generator capable of emitting a GLR parser in OCaml
Description
It is similar to Bison. The parsers it generates use the Generalized LR (GLR) parsing algorithm. GLR works with any context-free grammar, whereas LR parsers (such as Bison) require grammars to be LALR(1). Parsing with arbitrary context-free grammars has two key advantages: (1) unbounded lookahead, and (2) support for ambiguous grammars. Unbounded lookahead is achieved by allowing multiple potential parses to coexist for as long as necessary. Similarly, ambiguity is handled by letting potential parses be coalesced, with special action taken to handle the ambiguous region of the input. In general, by using the GLR algorithm, Elkhound avoids the difficulty of trying to make a language grammar fit the LALR(1) restrictions.
Dependencies
(
(
build:
sys-devel/cmake[>=3.24.0]
)
(
build:
dev-lang/ocaml
dev-lang/perl:*
sys-devel/bison
sys-devel/flex
)
)
Downloads
https://github.com/WeiDUorg/elkhound/archive/2019-08-25.tar.gz -> elkhound-2019-08-25.tar.gz
Licences
BSD-3