[erlang-questions] Problem parsing Erlang code
Sean Hinde
sean.hinde@REDACTED
Tue Nov 20 18:23:29 CET 2007
You need a full stop at the end not a semicolon.
Sean
On 20 Nov 2007, at 17:05, Joel Reymont wrote:
> I'm trying to generate Erlang code based on some data in a file. I
> thought I would try to type up the code I want to get to figure out
> what the core should be.
>
> I tried the following at the Erlang prompt but got an error. Any
> suggestions?
>
> Ultimately, I would want to generate the abstract forms by hand,
> filling in values from a file, and pretty-print them. Yes, I can
> generate the Erlang code by concatenating strings but I'd rather
> not. /
> Lisp macros, oh, how I miss you!/
>
> Thanks, Joel
>
> ---
>
> S = "show({'bicycling' = A, 1010 = B}) -> show_activity(A, B, 4,
> \"bicycling, <10\");".
> {ok, Toks, _} = erl_scan:string(S).
> {ok, AbsForm} = erl_parse:parse(Toks).
>
> =ERROR REPORT==== 20-Nov-2007::17:00:03 ===
> Error in process <0.31.0> with exit value: {{badmatch,{error,
> {999999,erl_parse,["syntax error before: ",[]]}}},[{erl_eval,expr,3}]}
>
> ** exited: {{badmatch,{error,{999999,erl_parse,["syntax error before:
> ",[]]}}},
> [{erl_eval,expr,3}]} **
>
> --
> http://wagerlabs.com
>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list