项目作者: reznikmm

项目描述 :
Grammar handling and parser generation Ada library
高级语言: Ada
项目地址: git://github.com/reznikmm/anagram.git
创建时间: 2017-11-10T17:09:39Z
项目社区:https://github.com/reznikmm/anagram

开源协议:MIT License

下载


Anagram

Build
Copr build status
reuse compliant

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

  1. make all install PREFIX=/path/to/install

Dependencies

It depends on Matreshka library.

Usage

Add with "anagram"; in your project file.

Maintainer

@MaximReznik.

Contribute

Feel free to dive in!
Open an issue or submit PRs.

License

MIT © Maxim Reznik