title: "Unrecognized rule" error in lex program
body: <p>I am writing a lex program. The objective of this problem is that I enter a string (letters and other characters) and it returns the length of this string.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>letter ([a-z]|[A-Z])
  carac (•|¤|¶|§|à|î|ì|Ä|Å|É|æ|Æ|ô|ö|ò|û|ù|ÿ|Ö|Ü|ø|£|Ø|×|ƒ|á|í|ó|ú|ñ|Ñ|ª|º|¿|®|¬|½|¼|¡|:|;|.|,|/|?|=|-|!|*|£|µ|^|¨|%)
  String {letter}({letter}|{carac})*
  %%
  {String} printf("[%d] : The number of your String \n",yyleng);
  .* printf("You have a problem somewhere !"); 
  %%
  int yywrap(){return 1;}
  main ()
  {
      yylex ();
  }
  </code></pre>
  
  <p>And the output:</p>
  
  <p><img src="https://i.stack.imgur.com/jpfox.png" alt="enter image description here"></p>