Logo Search packages:      
Sourcecode: jflex version File versions

void java_cup::runtime::lr_parser::restart_lookahead (  )  throws java.lang.Exception [inline, protected]

Reset the parse ahead input to one Symbol past where we started error recovery (this consumes one new Symbol from the real input).

Definition at line 1014 of file lr_parser.java.

References cur_token, error_sync_size(), lookahead, lookahead_pos, and scan().

Referenced by error_recovery().

      /* move all the existing input over */
      for (int i = 1; i < error_sync_size(); i++)
      lookahead[i-1] = lookahead[i];

      /* read a new Symbol into the last spot */
      // BUG Fix by Bruce Hutton
      // Computer Science Department, University of Auckland,
      // Auckland, New Zealand. [applied 5-sep-1999 by csa]
      // The following two lines were out of order!!
      lookahead[error_sync_size()-1] = cur_token;
      cur_token = scan();

      /* reset our internal position marker */
      lookahead_pos = 0;

Generated by  Doxygen 1.6.0   Back to index