erlson icon indicating copy to clipboard operation
erlson copied to clipboard

Why did you use a separate parser?

Open si14 opened this issue 13 years ago • 1 comments

Why didn't use standard erl_parse/erl_syntax?

si14 avatar Jul 13 '11 10:07 si14

I do extend the standard Erlang grammar by introducing several new erl_parse grammar productions: https://github.com/alavrik/erlson/blame/master/src/erl_parse.yrl

As for erl_syntax, there are two reasons. First, when I started working on Erlson, I wasn't sure I would get away with standard AST representation, and by doing everything manually I had more flexibility.Second, I had a working and tested AST traversal by the time I entered Spawnfest, and I decided to reuse in order to save some time.

It turned out that there were no need to introduce new AST elements. While erl_parse still has to remain custom, the parse transformation code can be rewritten to use Ulf Wiger's parse_trans and erl_syntax.

alavrik avatar Jul 13 '11 15:07 alavrik