abstract class Lexer in Plug 7
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
- class \Doctrine\Common\Lexer\AbstractLexer
- class \Doctrine\Common\Lexer
Expanded class hierarchy of Lexer
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ Lexer.php, line 35
Namespace
Doctrine\CommonView source
abstract class Lexer extends AbstractLexer {
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractLexer:: |
private | property | Lexer original input string. | |
AbstractLexer:: |
public | property | The next token in the input. | |
AbstractLexer:: |
private | property | Current peek of current lexer position. | |
AbstractLexer:: |
private | property | Current lexer position in input string. | |
AbstractLexer:: |
public | property | The last matched/seen token. | |
AbstractLexer:: |
private | property | Array of scanned tokens. | |
AbstractLexer:: |
abstract protected | function | Lexical catchable patterns. | 1 |
AbstractLexer:: |
public | function | Retrieve the original lexer's input until a given position. | |
AbstractLexer:: |
public | function | Gets the literal for a given token. | |
AbstractLexer:: |
protected | function | Regex modifiers | |
AbstractLexer:: |
abstract protected | function | Lexical non-catchable patterns. | 1 |
AbstractLexer:: |
abstract protected | function | Retrieve token type. Also processes the token value if necessary. | 1 |
AbstractLexer:: |
public | function | Peeks at the next token, returns it and immediately resets the peek. | |
AbstractLexer:: |
public | function | Checks if given value is identical to the given token. | |
AbstractLexer:: |
public | function | Checks whether a given token matches the current lookahead. | |
AbstractLexer:: |
public | function | Checks whether any of the given tokens matches the current lookahead. | |
AbstractLexer:: |
public | function | Moves to the next token in the input string. | |
AbstractLexer:: |
public | function | Moves the lookahead token forward. | |
AbstractLexer:: |
public | function | Resets the lexer. | |
AbstractLexer:: |
public | function | Resets the peek pointer to 0. | |
AbstractLexer:: |
public | function | Resets the lexer position on the input to the given position. | |
AbstractLexer:: |
protected | function | Scans the input string for tokens. | |
AbstractLexer:: |
public | function | Sets the input data to be tokenized. | |
AbstractLexer:: |
public | function | Tells the lexer to skip input tokens until it sees a token with the given value. |