public function Lexer::setInput

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.:

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php, line 66

Class

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

Namespace

Doctrine\Common

Code

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