title: Cayenne: retrieving positions of tokens after parsing an expression
body: <p>I am parsing an expression with Cayenne, so I have the tokens (org.apache.cayenne.exp.parser.Token) resulting from the parsing.</p>
  
  <p>I would like to know at what position in the parsed expression the token was found. My problem is that I am not able to find a method that returns this information. Does anyone know if that is possible ?</p>
  
  <p>This is an example of what I do:</p>
  
  <pre><code>String expression = "A &gt; 100"; // This gives 3 tokens, at positions 0, 2 and 4 respectively.
  
  ExpressionParser parser = new ExpressionParser(new StringReader(expression));
  
  Token token = parser.getNextToken();
  
  while (token != null &amp;&amp; token.toString().length() &gt; 0)
  {
      // Here I'd like to know at what position token was found in expression .
  
      ....
      ....
      token = parser.getNextToken();
  }
  </code></pre>