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.
ファイルを表示
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_oe property
public $negative_lookahead |
$one_or_more public_oe property
$optional public_oe property
$positive_lookahead public_oe property
public $positive_lookahead |
$silent public_oe property
$value public_oe property
$zero_or_more public_oe property