title: Unicode Character in flex?
body: <p>I have a simple question about two unicode-characters, which I want to use in my programming language. For an assignement I want to use the old APL Symbols ← as well as →.</p>
  
  <p>My flex-file (snazzle.l) looks like the following:</p>
  
  <pre><code>/** phi@gress.ly 2017                     **/
  /** parser for omni programming language. **/
  %{
  #include &lt;iostream&gt;
  using namespace std;
  #define YY_DECL extern "C" int yylex()
  int linenum = 0;
  %}
  
  %%
  [\n]           {++linenum;}
  
  [ \t]           ;
  [0-9]+\.[0-9]+([eE][+-]?[0-9]+)?  { cout &lt;&lt; linenum &lt;&lt; ". Found a floating-point number: " &lt;&lt; yytext &lt;&lt; endl; }
  \"[^\"]*\"      { cout &lt;&lt; linenum &lt;&lt; ". Found string: " &lt;&lt; yytext &lt;&lt; endl; }
  [0-9]+          { cout &lt;&lt; linenum &lt;&lt; ". Found an integer: " &lt;&lt; yytext &lt;&lt; endl; }
  [a-zA-Z0-9]+    { cout &lt;&lt; linenum &lt;&lt; ". Found an identifier: "   &lt;&lt; yytext &lt;&lt; endl; }
  ([\←])|([\→])|(:=)|(=:)  { cout &lt;&lt; linenum &lt;&lt; ". Found assignment operator: " &lt;&lt; yytext &lt;&lt;endl; }
  [\;]            { cout &lt;&lt; linenum &lt;&lt; ". Found statement delimiter: " &lt;&lt; yytext &lt;&lt;endl; }
  [\[\]\(\)\{\}]  { cout &lt;&lt; linenum &lt;&lt; ". Found parantheses: " &lt;&lt; yytext &lt;&lt; endl; }
  
  %%
  main() {
      // lex through the input:
      yylex();
  }
  </code></pre>
  
  <p>When I "snazzle" the following input:</p>
  
  <pre><code>x →  y;
  </code></pre>
  
  <p>I get the assignement character a) wrong and b) three (3) times:</p>
  
  <pre><code>0. Found an identifier: x
  0. Found assignment operator: �
  0. Found assignment operator: �
  0. Found assignment operator: �
  0. Found an identifier: y
  0. Found statement delimiter: ;
  </code></pre>
  
  <p>How can I add ← and → as possible flex-characters?</p>