Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reznikmm/anagram
Grammar handling and parser generation Ada library
https://github.com/reznikmm/anagram
ada grammars parsing syntax-analysis
Last synced: about 2 months ago
JSON representation
Grammar handling and parser generation Ada library
- Host: GitHub
- URL: https://github.com/reznikmm/anagram
- Owner: reznikmm
- License: mit
- Created: 2017-11-10T17:09:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-14T08:17:48.000Z (almost 4 years ago)
- Last Synced: 2024-07-31T20:42:14.895Z (5 months ago)
- Topics: ada, grammars, parsing, syntax-analysis
- Language: Ada
- Homepage:
- Size: 299 KB
- Stars: 3
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ada - anagram - Grammar handling and parser generation Ada library. (Libraries / Parsers, Scanners, Linters, Analysers, Interpreters and Prettyprinters)
README
Anagram
=======[![Build](https://github.com/reznikmm/anagram/workflows/Build/badge.svg)](https://github.com/reznikmm/anagram/actions)
[![Copr build status](https://copr.fedorainfracloud.org/coprs/reznik/ada/package/anagram/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/reznik/ada/)
[![reuse compliant](https://img.shields.io/badge/reuse-compliant-green.svg)](https://reuse.software/)> Grammar handling and parser generation Ada library
Anagram is an Ada library to work with grammars of program languages.
It provides a type to represent classic grammar formalism including
BNF, extended BNF and attributed grammars, subprograms to construct, read
and convert them, some checks, parser generation, etc.The Anagram makes it easy to create parsers of various kinds.
Main features:
* convert EBNF to BNF with several ways of expanding lists
* generate tables for LALR and simple LR parsers
* provides API to construct grammar or read it from a textual file
* resolve conflicts in LR table using precedence and associativity
* provides generic deterministic parser and Right Nulled GLR Parser
* provides simple templates to represet rules of attributed grammars
* API to construct First/Follow sets
* partition ordered attributed grammar to find attribute evaluation order
* write grammar in a file of yacc format
* provides some checks:
+ Is_Well_Formed
+ Is_L_Attributed
+ is ordered attributed grammar## Install
Run
```
make all install PREFIX=/path/to/install
```### Dependencies
It depends on [Matreshka](https://forge.ada-ru.org/matreshka) library.## Usage
Add `with "anagram";` in your project file.## Maintainer
[@MaximReznik](https://github.com/reznikmm).
## Contribute
Feel free to dive in!
[Open an issue](https://github.com/reznikmm/anagram/issues/new) or submit PRs.## License
[MIT](LICENSE) © Maxim Reznik