Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Hypnobeard
Sep 15, 2004

Obey the Beard



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?

Adbot
ADBOT LOVES YOU

Hypnobeard
Sep 15, 2004

Obey the Beard



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...

  • Locked thread