erlson
erlson copied to clipboard
Why did you use a separate parser?
Why didn't use standard erl_parse/erl_syntax?
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.