#intermediate-representation #describe #syntax #abstract #compiler #structures

asdl

Parser for ASDL format. Describes the abstract syntax of compiler intermediate representations and other tree-like data structures

2 stable releases

1.0.1 Dec 3, 2019
1.0.0 Sep 9, 2019

#1564 in Data structures

MIT/Apache

32KB
980 lines

Build Status

ASDL parser and CLI for code generation.

ASDL describes the abstract syntax of compiler intermediate representations and other tree-like data structures. Just as the lexical and syntactic structures of programming languages are described with regular expressions and context free grammars, ASDL provides a concise notation for describing the abstract syntax of programming languages. Tools can convert ASDL descriptions into the appropriate data-structure definitions and functions to convert the data-structures to or it easier to build compiler components that interoperate.

You can read about Asdl in this paper

Functionality is provided in two crates:

  • asdl - parser and api ready to use in code generation. Best suited for code generation with rust code. With quota for example.
  • asdl-tera model designed for template processing engines like tera and a CLI for code generation with tera template engine.

Dependencies

~1MB
~15K SLoC