Reputation: 1448
Following this guide: http://relops.com/blog/2014/01/13/leex_and_yecc
leex:file('lex')
This code generates a module with the name ?LEX
in Erlang, according to the guide. What's the name in Elixir?
Upvotes: 1
Views: 361
Reputation: 7471
If you call your file lexer.xrl
, leex
will generate an Erlang file called lexer.erl
that defines a module named lexer
. You can then use it from Elixir as :lexer.<function>
. To see the example of this in the article, search for selector_lexer.xrl
.
It will work similarly with parser.yrl
– you will get the Erlang module called parser
which you can invoke as :parser.<function>
in Elixir.
Upvotes: 1