|
I'm trying to create a lexer using leex in Erlang 19/Elixir. I'm having problems matching angle brackets. The lexer compiles fine, but trying to let the string ">" results in an error: No function clause matching in lists.sublist/2 The following arguments were given to lists.sublist/2: #1 ">" #2 1 Pretty sure the angle bracket is screwing with the string formatting in Erlang. Anyone have an idea how to parse angle brackets? What am I screwing up?
|
# ¿ Aug 25, 2017 21:22 |
|
|
# ¿ Apr 29, 2024 06:58 |
|
MononcQc posted:That looks like Elixir syntax; Elixir strings are actually Erlang binaries by default, and are incompatible with the string module. Try binary:part/2 or one of the string module functions (starting OTP-20 the one in Erlang supports unicode properly) Yes, it is from Elixir, though I'm still calling the Erlang directly. Ahhh.. durr, need to pass a char list in instead of an Elixir string. The simplest things...
|
# ¿ Aug 25, 2017 23:44 |