[erlang-questions] Newby question

Pascal pascal.guichard@REDACTED
Thu Dec 21 15:41:07 CET 2006


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



More information about the erlang-questions mailing list