You are here

public function AbstractLexer::setInput in Plug 7

Sets the input data to be tokenized.

The Lexer is immediately reset and the new input tokenized. Any unprocessed tokens from any previous input are lost.

Parameters

string $input The input to be tokenized.:

Return value

void

File

lib/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php, line 90

Class

AbstractLexer
Base class for writing simple lexers, i.e. for creating small DSLs.

Namespace

Doctrine\Common\Lexer

Code

public function setInput($input) {
  $this->input = $input;
  $this->tokens = array();
  $this
    ->reset();
  $this
    ->scan($input);
}