You are here

abstract class Lexer in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/lib/Doctrine/Common/Lexer.php \Doctrine\Common\Lexer

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

Lexer moved into its own Component Doctrine\Common\Lexer. This class only stays for being BC.

@since 2.0 @author Guilherme Blanco <guilhermeblanco@hotmail.com> @author Jonathan Wage <jonwage@gmail.com> @author Roman Borschel <roman@code-factory.org>

Hierarchy

Expanded class hierarchy of Lexer

File

vendor/doctrine/common/lib/Doctrine/Common/Lexer.php, line 35

Namespace

Doctrine\Common
View source
abstract class Lexer extends AbstractLexer {

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractLexer::$input private property Lexer original input string.
AbstractLexer::$lookahead public property The next token in the input.
AbstractLexer::$peek private property Current peek of current lexer position.
AbstractLexer::$position private property Current lexer position in input string.
AbstractLexer::$token public property The last matched/seen token.
AbstractLexer::$tokens private property Array of scanned tokens.
AbstractLexer::getCatchablePatterns abstract protected function Lexical catchable patterns. 2
AbstractLexer::getInputUntilPosition public function Retrieve the original lexer's input until a given position.
AbstractLexer::getLiteral public function Gets the literal for a given token.
AbstractLexer::getModifiers protected function Regex modifiers 1
AbstractLexer::getNonCatchablePatterns abstract protected function Lexical non-catchable patterns. 2
AbstractLexer::getType abstract protected function Retrieve token type. Also processes the token value if necessary. 2
AbstractLexer::glimpse public function Peeks at the next token, returns it and immediately resets the peek.
AbstractLexer::isA public function Checks if given value is identical to the given token.
AbstractLexer::isNextToken public function Checks whether a given token matches the current lookahead.
AbstractLexer::isNextTokenAny public function Checks whether any of the given tokens matches the current lookahead.
AbstractLexer::moveNext public function Moves to the next token in the input string. 1
AbstractLexer::peek public function Moves the lookahead token forward.
AbstractLexer::reset public function Resets the lexer. 1
AbstractLexer::resetPeek public function Resets the peek pointer to 0.
AbstractLexer::resetPosition public function Resets the lexer position on the input to the given position.
AbstractLexer::scan protected function Scans the input string for tokens.
AbstractLexer::setInput public function Sets the input data to be tokenized.
AbstractLexer::skipUntil public function Tells the lexer to skip input tokens until it sees a token with the given value.