PHP Класс 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.
Показать файл
Открыть проект
Открытые свойства
Открытые методы
Метод |
Описание |
|
__construct ( $type, $value = NULL ) |
|
|
compile ( ) |
abstract protected function match_code() ; |
|
Описание методов
__construct()
публичный Метод
compile()
публичный Метод
abstract protected function match_code() ;
Описание свойств
$negative_lookahead публичное свойство
public $negative_lookahead |
$one_or_more публичное свойство
$optional публичное свойство
$positive_lookahead публичное свойство
public $positive_lookahead |
$silent публичное свойство
$value публичное свойство
$zero_or_more публичное свойство