[erlang-questions] how: Building Core Erlang abstract syntax trees

Christian S chsu79@REDACTED
Sat May 31 18:15:48 CEST 2008


One can use compile:forms/2 to compile core erlang abstract syntax
trees directly, but what is the suggested way to construct these
trees?

There is lib/compile/src/core_parse.* (and especially the records in
the hrl file), and there is the 'cerl' module which has good edoc. The
module 'cerl' has node-constructors for the core erlang ast.

Looking at LFE, it doesnt make use of cerl, it hits the core erlang
records directly. Is this an oversight of Robert Virding or the more
practical thing to do?

Also, Core Erlang allows for annotations, what is the benefits one
could have from adding these? Static type analysis or can the compiler
make use of them?



More information about the erlang-questions mailing list