[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/mp-includes/composer/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/ -> AbstractLexer.php (summary)

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

Author: Guilherme Blanco <guilhermeblanco@hotmail.com>
Author: Jonathan Wage <jonwage@gmail.com>
Author: Roman Borschel <roman@code-factory.org>
File Size: 327 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 15 functions


Functions that are not part of a class:

setInput($input)   X-Ref
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.

param: string $input The input to be tokenized.
return: void

reset()   X-Ref
Resets the lexer.

return: void

resetPeek()   X-Ref
Resets the peek pointer to 0.

return: void

resetPosition($position = 0)   X-Ref
Resets the lexer position on the input to the given position.

param: integer $position Position to place the lexical scanner.
return: void

getInputUntilPosition($position)   X-Ref
Retrieve the original lexer's input until a given position.

param: integer $position
return: string

isNextToken($token)   X-Ref
Checks whether a given token matches the current lookahead.

param: integer|string $token
return: boolean

isNextTokenAny(array $tokens)   X-Ref
Checks whether any of the given tokens matches the current lookahead.

param: array $tokens
return: boolean

moveNext()   X-Ref
Moves to the next token in the input string.

return: boolean

skipUntil($type)   X-Ref
Tells the lexer to skip input tokens until it sees a token with the given value.

param: string $type The token type to skip until.
return: void

isA($value, $token)   X-Ref
Checks if given value is identical to the given token.

param: mixed   $value
param: integer $token
return: boolean

peek()   X-Ref
Moves the lookahead token forward.

return: array|null The next token or NULL if there are no more tokens ahead.

glimpse()   X-Ref
Peeks at the next token, returns it and immediately resets the peek.

return: array|null The next token or NULL if there are no more tokens ahead.

scan($input)   X-Ref
Scans the input string for tokens.

param: string $input A query string.
return: void

getLiteral($token)   X-Ref
Gets the literal for a given token.

param: integer $token
return: string

getModifiers()   X-Ref
Regex modifiers

return: string

Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1