[erlang-questions] Newby question

Alex Arnon <>
Thu Dec 21 18:02:18 CET 2006


Um, why did you go to the ecc_parser, of all places, if you're trying to
learn the _language_?


On 12/21/06, Pascal <> wrote:
>
>
> Hello everybody,
>
> i try to learn some Erlang, ans went to the users' guide, and then to
> practice a little to the examples.
>
> so i compiled and ran the ecc_parser, but cannot continue with this output
> :
>
> {ok,[{compiler,"ebnf"},
>      {characters,[{"small",{string,"abcdefghijklmnopqrstuvwxyz"}},
>                   {"big",{string,"ABCDEFGHIJKLMNOPQRSTUVWXYZ"}},
>                   {"alpha",{plus,{atom,"small"},{atom,"big"}}},
>                   {"dig",{string,"0123456789"}},
>                   {"blank",{plus,{chr,9},{plus,{chr,10},{chr,32}}}},
>                   {"noQuote",{minus,any,{string,"""}}}]},
>      {comments,"(*","*)",nested},
>      {tokens,[{prod,"Nonterminal",
>
>                     {seq,{nt,"small"},{star,{alt,{nt,"alpha"},{nt,"dig"}}}}},
>               {prod,"Terminal",
>
>                     {seq,{nt,"big"},{star,{alt,{nt,"alpha"},{nt,"dig"}}}}},
>               {prod,"White",{seq,{nt,"blank"},{star,{nt,"blank"}}}},
>               {prod,"String",
>
>                     {seq,{tq,"""},{seq,{star,{nt,"noQuote"}},{tq,"""}}}}]},
>      {ignore,["White","Comment"]},
>      {syntax,[{prod,"ebnf",{seq,{star,{nt,"production"}},{ts,"."}}},
>               {prod,"production",
>                     {seq,{ta,"Nonterminal"},
>                          {seq,{ts,"="},{seq,{nt,"expr"},{ts,";"}}}}},
>               {prod,"expr",
>                     {seq,{nt,"term"},{star,{seq,{ts,"|"},{nt,"term"}}}}},
>               {prod,"term",{seq,{nt,"factor"},{star,{nt,"factor"}}}},
>               {prod,"factor",
>                     {alt,{seq,{ts,"{"},{seq,{nt,"expr"},{ts,"}"}}},
>
> {alt,{seq,{ts,"["},{seq|...}},{alt,{seq|...},{...}}}}}]},
>      {theend,{atom,33,"ebnf"}}]}
>
> So could someone gimme  some explanations, what is this output, how i can
> make further with this example, to go to the ebnf parser, and then a program
> that deals with grammar, or at least point me somewhere, that takes on the
> path.
>
> thanks in advance.
> _________________________________________________________
> Post sent from http://www.trapexit.org
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20061221/7773c79a/attachment.html>


More information about the erlang-questions mailing list