4
require_once dirname(__FILE__).'/../../scripts/__init_script__.php';
22
'start' => 'maybe_optional',
23
'maybe_optional' => array(
24
'yes' => 'opt maybe_comment',
25
'no' => 'maybe_comment',
27
'maybe_comment' => array(
28
'yes' => 'type comment',
31
'comment' => '( comment_text )',
32
'comment_text' => array(
37
'yes' => 'some_type ?',
45
'or_type | not_or_type',
46
'not_or_type | not_or_type',
48
'not_or_type' => array(
53
'basic_type' => array(
57
'map < type , type >',
64
$parser = id(new PhutilParserGenerator())
65
->setTerminals($terminals)
69
echo $parser->generateParserFunction('phutil_type_spec_parser')."\n";