|How to store an AST email@example.com (Salvador V. Cavadini) (1999-04-30)|
|Re: How to store an AST firstname.lastname@example.org (Steve Mading) (1999-05-07)|
|Re: How to store an AST email@example.com (Dave Hanson) (1999-05-07)|
|Re: How to store an AST firstname.lastname@example.org (Mike Harrison) (1999-05-09)|
|Re: How to store an AST email@example.com (Nils M Holm) (1999-05-16)|
|Re: How to store an AST WN.Jacobs@net.HCC.nl (Willy Jacobs) (1999-05-16)|
|From:||"Dave Hanson" <firstname.lastname@example.org>|
|Date:||7 May 1999 21:10:47 -0400|
Salvador V. Cavadini <email@example.com> wrote
> I'm programming a front-end for a tool and I need to store in disk the
> AST produced by the parser. The rest of the tool will randomly access
> the AST's nodes. I would be greatful if someone can recommend an
> efficient way for store the AST.
This problem is exactly what ASDL (Abstract Syntax Description
Language) and its tools solve. Here's a 1-paragraph description of
ASDL from my paper "Early Experience with ASDL in lcc",
Software-Practice and Experience 29 (5), 417-435, 4/99
ASDL is a small, domain-specific language for describing tree data
structures. ASDL specifications are concise and independent of any
particular programming language. The ASDL generator, asdlGen, accepts
an ASDL specification and emits code that defines a concrete
representation for the data structures described in the specification,
along with code that constructs, reads, and writes instances of those
data structures. Currently, asdlGen can emit data-structure
implementations in C, C++, Java, ML, and Haskell. ASDL specifications
tend to be much smaller than the corresponding language-specific
data-structure and function definitions.
See http://www.cs.princeton.edu/zephyr/ASDL/ for more information and
the software itself.
Return to the
Search the comp.compilers archives again.