title: RPLY parser returns ValueError
body: <p>I am trying to write a basic programming language. I am using RPLY for lexing and parsing. I have written 4 tokens required in assigning a value to a variable:</p>
  
  <pre><code>    self.lexer.add('INT', r'd+')
      self.lexer.add('STRING', r'"[^"]*"')
      self.lexer.add('ASSIGN', r'\=')
      self.lexer.add('IDENT', r'[a-zA-Z_][a-zA-Z\d_]*')
  </code></pre>
  
  <p>My parser generator accepts these tokens</p>
  
  <pre><code>        self.pg = ParserGenerator(
          # A list of all token names accepted by the parser.
          ['NUMBER', 'PRINT', 'OPEN_PAREN', 'CLOSE_PAREN',
           'SEMI_COLON', 'SUM', 'SUB', 'MUL', 'INT', 'STRING', 'IDENT', 'ASSIGN'],
          precedence=[
              ('left', ['SUM','SUB']),
              ('left', ['STRING', 'IDENT', 'ASSIGN'])
          ]
      )
  </code></pre>
  
  <p>Here's the production for creating a variable</p>
  
  <pre><code>    @self.pg.production('identifier : STRING IDENT ASSIGN expression')
      @self.pg.production('identifier : INT IDENT ASSIGN expression')
      def identifier(p):
          return p
  </code></pre>
  
  <p>And when I try to run it I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
  
  
  File "main.py", line 21, in &lt;module&gt;
      parser.parse(tokens).eval()
    File "/xxx/xxx/anaconda3/lib/python3.7/site-packages/rply/parser.py", line 60, in parse
      self.error_handler(lookahead)
    File "/home/xxx/xxx/Project/parser.py", line 53, in error_handle
      raise ValueError(token)
  ValueError: Token('IDENT', 'string')
  </code></pre>
  
  <p>Input file:</p>
  
  <pre><code>    string oki = "ssds"
      print(oki);
  </code></pre>
  
  <p>It parses string into IDENT where string should be parsed into STRING token instead. Precedence is set, but maybe it doesn't recognize it?</p>