[erlang-questions] This *SHOULD* be simple... compile a string to assembler.

Vlad Dumitrescu <>
Fri Jul 23 09:28:24 CEST 2010


On Fri, Jul 23, 2010 at 09:15, Michael Richter <> wrote:
> 1> {ok, Tokens, _} = erl_scan:string("a () -> 42.").
> 2> {ok, AbsForm} = erl_parse:parse_form(Tokens).
> 4> {ok, Tokens2, _} =
> erl_scan:string("-module(null).\n-compile(export_all).\na () -> 42.").
> 5> {ok, AbsForm} = erl_parse:parse_form(Tokens2).

Hi,

On line 5 you are matching against the old AbsForm... Use AbsForm2
instead, or "f(AbsForm)".

regards,
Vlad


More information about the erlang-questions mailing list