[erlang-questions] Problems with the Erlang grammar and yecc

Alessandro Sivieri <>
Wed May 7 11:58:51 CEST 2014


Hi,

I was experimenting with yecc and the Erlang grammar (taken from stdlib
sources), but I got immediately stuck.

I wrote a very simple module (e.g., a module defining one single function),
then I executed the following sequence of actions:

* put the content of the module in a single string
* tokenize it using erl_scan
* parse it using the module generated by yecc

If I follow this sequence of actions, I get the following error:

{error,{2,erl_grammar,["syntax error before: ","'-'"]}}

I think it gets stuck in the "export" definition, because if my module
contains only the "module" definition, I get no errors.

Any idea?

-- 
Sivieri Alessandro

http://sivieri.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140507/a78b1cc1/attachment.html>


More information about the erlang-questions mailing list