new lexer()
This is the php lexer. It will tokenize the string for helping the parser to build the AST from its grammar.
Properties:
| Name | Type | Description |
|---|---|---|
EOF |
Integer | |
all_tokens |
Boolean |
defines if all tokens must be retrieved (used by token_get_all only) |
comment_tokens |
Boolean |
extracts comments tokens |
mode_eval |
Boolean |
enables the evald mode (ignore opening tags) |
asp_tags |
Boolean |
disables by default asp tags mode |
short_tags |
Boolean |
enables by default short tags mode |
keywords |
Object |
List of php keyword |
castKeywords |
Object |
List of php keywords for type casting |
Methods
getState()
Gets the current state
input()
consumes and returns one char from the input
setInput()
Initialize the lexer with the specified input
setState()
Sets the current lexer state
unput()
revert eating specified size