Prolog interface and ASCII parsing
Mats Cronqvist
mats.cronqvist@REDACTED
Wed Jan 4 16:24:21 CET 2006
like this?
> {ok,Toks,_} = erl_scan:string("[{foo,bla},x].").
> {ok,Term} = erl_parse:parse_term(Toks).
> Term.
{ok,[{foo,bla},x]}
mats
Rupert Meese wrote:
> Hi,
>
> I am trying to create an interface between parts of my system in Erlang
> and prolog. However, I can not see a way of creating a communication
> channel over which I can send from prolog an ACSII list to be parsed in
> Erlang as an Erlang term. That is, in Erlang I can use file:read() to
> read a term, but only from a file, not a pipe. I can create a link using
> gen_tcp:*, open_port() etc. but receive binary objects or lists of bytes
> that I can not see how parse as ASCII Erlang terms.
>
> Does anyone have any suggestions?
>
> Thanks
> Rupert Meese
More information about the erlang-questions
mailing list