Abstract forms

Vlad Dumitrescu <>
Tue Jan 16 11:08:44 CET 2001


> > I have been playing a lot with code, erl_parse, beam_lib and the
> > likes, and things go pretty well.

>It could be fed into compile:forms, but you'd have to modify it a bit
>first:
>	- add a module declaration form at the top of the list:
>	    {attribute,Line,module,ModuleName}
>	- remove the auto-generated code for "module_info" functions:
>	    {function,Line,module_info,0,Clauses}
>	    {function,Line,module_info,1,Clauses}

Thanks. I had managed to work it out myself, and it works now.

However, there is a problem: if I try to compile a function with guards, I 
get an error from the compiler saying "illegal guard expression". It works 
fine to compile it as usual... Any idea why?

Then there is a more general observation: it's not at all easy to navigate 
the abstract forms in order to make changes... compared to Lisp, anyway, 
because there everything is a list, here the structure is heterogenous...

regards,
Vlad
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




More information about the erlang-questions mailing list