escript problem?
Luke Gorrie
luke@REDACTED
Wed Nov 12 16:18:28 CET 2003
Hi Younès,
I don't know the answer to your question, so I'm Cc'ing this to the
erlang-questions@REDACTED mailing list.
> I've tried to use escript (http://www.sics.se/~joe/sae.html#escript)
> yesterday. When I've test the -mode(compile) the test script crash.
> I've attached the test script (test.erl) and the crash dump
> (erl_crash.dump.gz).
> Could you help me to understand what happen?
I would add my question: what's the status of escript? I just noticed
that it comes with R9C-0, though in my 'make install' setup it doesn't
seem to work.
> #!/usr/bin/env escript
>
> %-mode(compile).
>
> main(_) ->
> {match, ["name","domain.com"]} =
> groups(" name@REDACTED ", " *\\([^ ]+\\)@\\([^ ]+\\)"),
>
> {match, []} = groups("abcd", ".*bc"),
>
> {match, ["bcd"]} = groups("abcdefgh", "a\\(.*\\)efgh"),
>
> {match, ["cd","h"]} = groups("abcdefh", ".*\\(c.\\).*\\(.\\)"),
>
> RE_URL="\\(.+\\)://\\(.+\\)\\(/.+\\)(\\?\\(.*\\)(&\\(.*\\))*)?",
> {match, ["http","localhost:80","/script"]} =
> groups("http://localhost:80/script", RE_URL),
>
> {match, ["http","localhost","/script","arg"]} =
> groups("http://localhost/script?arg", RE_URL),
>
> {match, ["http","localhost","/script","arg","arg2"]} =
> groups("http://localhost/script?arg&arg2", RE_URL),
>
> {match, ["http","localhost:81","/script","arg","arg2","arg3"]} =
> groups("http://localhost:81/script?arg&arg2&arg3", RE_URL),
> {match, ["http","localhost:81","/script","arg","arg2","arg3", "arg4","arg5","arg6"]} =
> groups("http://localhost:81/script?arg&arg2&arg3&arg4&arg5&arg6", RE_URL),
> ok.
>
> groups(S, RE) ->
> Res = gregexp:groups(S, RE),
> io:format("~p: ~p~n", [S, Res]),
> Res.
More information about the erlang-questions
mailing list