Skip to content

Commit

Permalink
Add a version of Erlang parser that injects Erlson at parse time
Browse files Browse the repository at this point in the history
This is the first step in making Erlson work from Erlang shell.
  • Loading branch information
alavrik committed Jul 9, 2011
1 parent 3a888a1 commit 17efac2
Show file tree
Hide file tree
Showing 4 changed files with 1,115 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,6 +3,7 @@ ebin
*.beam
*.P
src/erl_parse.erl
src/erl_parse_shell.erl

# vim:
*.swp
2 changes: 1 addition & 1 deletion src/Makefile
@@ -1,4 +1,4 @@
ERL_SOURCES = erl_parse.erl erlson_pt.erl erlson.erl
ERL_SOURCES = erl_parse.erl erl_parse_shell.erl erlson_pt.erl erlson.erl
ERL_TESTS = erlson_tests.erl
TEST = erlson_tests

Expand Down
2 changes: 2 additions & 0 deletions src/erl_parse.yrl
Expand Up @@ -352,10 +352,12 @@ record_expr -> expr_max '#' record_tuple :
{record,?line('$2'),'$1','','$3'}.
record_expr -> record_expr '#' atom '.' atom :
{record_field,?line('$2'),'$1',element(3, '$3'),'$5'}.
% XXX: is this useful? include anyway for completeness?
record_expr -> record_expr '.' atom :
{record_field,?line('$2'),'$1','','$3'}.
record_expr -> record_expr '#' atom record_tuple :
{record,?line('$2'),'$1',element(3, '$3'),'$4'}.
% XXX: is this useful? include anyway for completeness?
record_expr -> record_expr '#' record_tuple :
{record,?line('$2'),'$1','','$3'}.

Expand Down

0 comments on commit 17efac2

Please sign in to comment.