예제 #1
0
파일: Delay.php 프로젝트: ngyuki/PHPPEG
<?php

include_once dirname(__FILE__) . '/t/t.php';
$t = new lime_test();
function parser()
{
    return PEG::token('a');
}
$p = PEG::delay('parser');
$t->is($p->parse(PEG::context('a')), 'a');
$t->is($p->parse(PEG::context('b')), PEG::failure());