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.
Автор: hamish
Наследование: extends PHPWriter
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$negative_lookahead
$one_or_more
$optional
$positive_lookahead
$silent
$tag
$type
$value
$zero_or_more

Открытые методы

Метод Описание
__construct ( $type, $value = NULL )
compile ( ) abstract protected function match_code() ;

Описание методов

__construct() публичный Метод

public __construct ( $type, $value = NULL )

compile() публичный Метод

abstract protected function match_code() ;
public compile ( )

Описание свойств

$negative_lookahead публичное свойство

public $negative_lookahead

$one_or_more публичное свойство

public $one_or_more

$optional публичное свойство

public $optional

$positive_lookahead публичное свойство

public $positive_lookahead

$silent публичное свойство

public $silent

$tag публичное свойство

public $tag

$type публичное свойство

public $type

$value публичное свойство

public $value

$zero_or_more публичное свойство

public $zero_or_more