Updating a big AST

wboeke@REDACTED wboeke@REDACTED
Tue Feb 9 09:25:26 CET 1999


--------------------------------------------------------------------
From: W.Boeke, Lucent Technologies, boeke@REDACTED
To  : Erlang discussion group, erlang-questions@REDACTED
Date: febr 9, 1999
--------------------------------------------------------------------

Hi,

Tobbe, thanks for your helpful answer to my question about
associative arrays.

Here comes another (newbee) question. I must parse source code written
in some rather unstructured language, and I want to fill several
big AST's (abstract syntax trees) with the information that the
parser reads. Thus, the AST's are updated in a way that is not known
beforehand.

For the AST's I could take process dictionary variables, because these
can be updated destructively. However, for each small component that I
add to an AST, I would be oblighed to copy the whole AST, and add the
new component during this copy.

I am aware that this is an old issue for functional languages, and I am
shure that a nice pattern exists how to solve this in Erlang.
 
Kind regards,
Wouter Boeke



More information about the erlang-questions mailing list