php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
tokenizer_data_gen.php File Reference

Go to the source code of this file.

Variables

 $infile = __DIR__ . '/../../Zend/zend_language_parser.y'
 
 $outfile_stub = __DIR__ . '/tokenizer_data.stub.php'
 
 $outfile_c = __DIR__ . '/tokenizer_data.c'
 
if(!file_exists($infile)) $result
 
n const T_DOUBLE_COLON = UNKNOWN
 
n Wrote $outfile_stub n t tcase T_PAAMAYIM_NEKUDOTAYIM
 
n t tcase $tokenName
 

Variable Documentation

◆ $infile

$infile = __DIR__ . '/../../Zend/zend_language_parser.y'

Definition at line 4 of file tokenizer_data_gen.php.

◆ $outfile_c

$outfile_c = __DIR__ . '/tokenizer_data.c'

Definition at line 6 of file tokenizer_data_gen.php.

◆ $outfile_stub

$outfile_stub = __DIR__ . '/tokenizer_data.stub.php'

Definition at line 5 of file tokenizer_data_gen.php.

◆ $result

if (!file_exists( $infile)) $result
Initial value:
= "<?php\n\n\n\n";
$incontent = file_get_contents($infile);
preg_match_all('(^%token.*\b(?<token_name>T_.*?)\b)m', $incontent, $matches);
foreach ($matches['token_name'] as $tokenName) {
if ($tokenName === 'T_NOELSE' || $tokenName === 'T_ERROR') {
continue;
}
$result .= "\n";
$result .= "const $tokenName = UNKNOWN
file_get_contents(string $filename, bool $use_include_path=false, $context=null, int $offset=0, ?int $length=null)
foreach(explode("\n", $input) as $line) $result
preg_match_all(string $pattern, string $subject, &$matches=null, int $flags=0, int $offset=0)
n t tcase $tokenName

Definition at line 19 of file tokenizer_data_gen.php.

◆ $tokenName

n t tcase $tokenName

Definition at line 77 of file tokenizer_data_gen.php.

◆ T_DOUBLE_COLON

n const T_DOUBLE_COLON = UNKNOWN

Definition at line 33 of file tokenizer_data_gen.php.

◆ T_PAAMAYIM_NEKUDOTAYIM

n Wrote $outfile_stub n t tcase T_PAAMAYIM_NEKUDOTAYIM

Definition at line 75 of file tokenizer_data_gen.php.