title: ANTLR3 grammar does not match rule with predicate
body: <p>I have a combined grammar where I need to provide for two identifier lexer rules. 
  Both identifiers can be used at the same time. Identifier1 comes before Identifer2 in grammar. </p>
  
  <p>First identifier is static, whereas second identifier rule changes on the basis of some flag.(Using predicate).</p>
  
  <p>I want the second identifier to match in parser rules. But as both identifiers may match some common inputs, It does not fall on identifer2. </p>
  
  <p>I have created small grammar to make it understandable. Grammar is as:</p>
  
  <pre><code>@lexer::members
  {
    private boolean flag;
  
    public void setFlag(boolean flag)
    {
      this.flag = flag;
    }
  }
  
  
  identifier1 :
   ID1
   ;
  
  identifier2 :
  ID2
  ; 
  
  
  ID1 : (CHARS) *;
  
  
  ID2 : (CHARS | ({flag}? '_'))* ;
  
  
  fragment CHARS 
  : 
    ('a' .. 'z')
  ;  
  </code></pre>
  
  <p>If I try to match identifer2 rule as :</p>
  
  <pre><code>    ANTLRStringStream in = new ANTLRStringStream("abcabde");
      IdTestLexer lexer = new IdTestLexer(in);
      lexer.setFlag(true);
      CommonTokenStream tokens = new CommonTokenStream(lexer);
      IdTestParser parser = new IdTestParser(tokens);
      parser.identifier2();
  </code></pre>
  
  <p>It shows error:
  line 1:0 missing ID2 at 'abcabde'</p>