Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noughtmare/gpc
Leightweight generalized parser combinators
https://github.com/noughtmare/gpc
Last synced: 23 days ago
JSON representation
Leightweight generalized parser combinators
- Host: GitHub
- URL: https://github.com/noughtmare/gpc
- Owner: noughtmare
- License: agpl-3.0
- Created: 2023-04-10T10:21:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-23T19:45:43.000Z (12 months ago)
- Last Synced: 2023-11-23T20:33:37.224Z (12 months ago)
- Language: Haskell
- Size: 1.52 MB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# GPC
GPC is a library providing generalized parser combinators
which are able to parse all context-free grammars completely. This includes
support for left-recursion and reporting all possible parses of ambiguous
grammars.GPC is currently only a proof of concept. Of course it needs a much more
elaborate API, but before that I want to implement disambiguation strategies.
I have also not put any effort in making this library performant yet.## Comparison with other parsing techniques
Feature | (atto/mega)parsec | happy (LALR) | Earley | GPC
---------------------------|--------------------|--------------------|--------------------|--------------------
No shift-reduce conflicts | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark:
Left-recusion | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:
Pure Haskell | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark:
Monadic interface | :heavy_check_mark: | :x: | :x: | :heavy_check_mark:
Polynomial time worst-case | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:
Linear time worst-case | :x: | :heavy_check_mark: | :x: | :x:
Linear time possible | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark:
Disambiguation annotations | :x: | :x: | :x: | planned