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.
Author: hamish
Inheritance: extends PHPWriter
Show file Open project: neos/flow-development-collection

Public Properties

Property Type Description
$negative_lookahead
$one_or_more
$optional
$positive_lookahead
$silent
$tag
$type
$value
$zero_or_more

Public Methods

Method Description
__construct ( $type, $value = NULL )
compile ( ) abstract protected function match_code() ;

Method Details

__construct() public method

public __construct ( $type, $value = NULL )

compile() public method

abstract protected function match_code() ;
public compile ( )

Property Details

$negative_lookahead public property

public $negative_lookahead

$one_or_more public property

public $one_or_more

$optional public property

public $optional

$positive_lookahead public property

public $positive_lookahead

$silent public property

public $silent

$tag public property

public $tag

$type public property

public $type

$value public property

public $value

$zero_or_more public property

public $zero_or_more