PHP Class PhpPeg\Token
This base class provides the compile() function, which handles the token modifiers ( ? * + & ! )
Each child class should provide the function match_code() which will generate the code to match against that specific token type.
In that generated code they should include the lines MATCH or FAIL when a match or a decisive failure occurs. These will
be overwritten when they are injected into parent Tokens or Rules. There is no requirement on where MATCH and FAIL can occur.
They tokens are also responsible for storing and restoring state when nessecary to handle a non-decisive failure.
Show file
Open project: neos/flow-development-collection
Public Properties
Public Methods
Method |
Description |
|
__construct ( $type, $value = NULL ) |
|
|
compile ( ) |
abstract protected function match_code() ; |
|
Method Details
__construct()
public method
abstract protected function match_code() ;
Property Details
$negative_lookahead public property
public $negative_lookahead |
$one_or_more public property
$optional public property
$positive_lookahead public property
public $positive_lookahead |
$zero_or_more public property