Doctrine\Common\Annotations\DocLexer
Simple lexer for docblock annotations.
- Author: Benjamin Eberlei <kontakt@beberlei.de>
Synopsis
class DocLexer
extends Lexer
{
- // constants
- const T_NONE = 1;
- const T_INTEGER = 2;
- const T_STRING = 3;
- const T_FLOAT = 4;
- const T_IDENTIFIER = 100;
- const T_AT = 101;
- const T_CLOSE_CURLY_BRACES = 102;
- const T_CLOSE_PARENTHESIS = 103;
- const T_COMMA = 104;
- const T_EQUALS = 105;
- const T_FALSE = 106;
- const T_NAMESPACE_SEPARATOR = 107;
- const T_OPEN_CURLY_BRACES = 108;
- const T_OPEN_PARENTHESIS = 109;
- const T_TRUE = 110;
- const T_NULL = 111;
- const T_COLON = 112;
- // Inherited members from Lexer
- public array $lookahead;
- public array $token;
- // methods
- protected void getCatchablePatterns()
- protected void getNonCatchablePatterns()
- protected int getType()
- // Inherited methods from Lexer
- public void setInput()
- public void reset()
- public void resetPeek()
- public void resetPosition()
- public boolean isNextToken()
- public boolean isNextTokenAny()
- public array|null moveNext()
- public void skipUntil()
- public boolean isA()
- public array peek()
- public array|null glimpse()
- protected void scan()
- public string getLiteral()
- protected abstract array getCatchablePatterns()
- protected abstract array getNonCatchablePatterns()
- protected abstract integer getType()
Hierarchy
Extends
Constants
Name | Value |
---|---|
T_NONE | 1 |
T_INTEGER | 2 |
T_STRING | 3 |
T_FLOAT | 4 |
T_IDENTIFIER | 100 |
T_AT | 101 |
T_CLOSE_CURLY_BRACES | 102 |
T_CLOSE_PARENTHESIS | 103 |
T_COMMA | 104 |
T_EQUALS | 105 |
T_FALSE | 106 |
T_NAMESPACE_SEPARATOR | 107 |
T_OPEN_CURLY_BRACES | 108 |
T_OPEN_PARENTHESIS | 109 |
T_TRUE | 110 |
T_NULL | 111 |
T_COLON | 112 |
Members
protected
- $noCase
- $withCase
public
- $lookahead — array
- $token — array
Methods
protected
- getCatchablePatterns() — {@inheritdoc}
- getNonCatchablePatterns() — {@inheritdoc}
- getType() — {@inheritdoc}
Inherited from Doctrine\Common\Lexer
protected
- getCatchablePatterns() — Lexical catchable patterns.
- getNonCatchablePatterns() — Lexical non-catchable patterns.
- getType() — Retrieve token type. Also processes the token value if necessary.
- scan() — Scans the input string for tokens.
public
- getLiteral() — Gets the literal for a given token.
- glimpse() — Peeks at the next token, returns it and immediately resets the peek.
- isA() — Checks if given value is identical to the given token
- isNextToken() — Checks whether a given token matches the current lookahead.
- isNextTokenAny() — Checks whether any of the given tokens matches the current lookahead
- moveNext() — Moves to the next token in the input string.
- peek() — Moves the lookahead token forward.
- reset() — Resets the lexer.
- resetPeek() — Resets the peek pointer to 0.
- resetPosition() — Resets the lexer position on the input to the given position.
- setInput() — Sets the input data to be tokenized.
- skipUntil() — Tells the lexer to skip input tokens until it sees a token with the given value.