예제 #1
0
 public function reset()
 {
     parent::reset();
     // reset all recognizer state variables
     if ($this->input != null) {
         $this->input->seek(0);
         // rewind the input
     }
 }
예제 #2
0
 public function reset()
 {
     parent::reset();
     // reset all recognizer state variables
     // wack Lexer state variables
     if ($this->input != null) {
         $this->input->seek(0);
         // rewind the input
     }
     if ($this->state == null) {
         return;
         // no shared state work to do
     }
     $this->state->token = null;
     $this->state->type = TokenConst::$INVALID_TOKEN_TYPE;
     $this->state->channel = TokenConst::$DEFAULT_CHANNEL;
     $this->state->tokenStartCharIndex = -1;
     $this->state->tokenStartCharPositionInLine = -1;
     $this->state->tokenStartLine = -1;
     $this->state->text = null;
 }