예제 #1
0
<?php

include_once dirname(__FILE__) . '/../../t.php';
$t = new lime_test();
$p = HatenaSyntax_Locator::it()->bracket;
$c = PEG::context('[http://google.com:title=hoge]');
$t->ok($p->parse($c));
예제 #2
0
 /**
  * 文字列をパースしてHatenaSyntax_Nodeインスタンスからなる構文木を返す。
  *
  * @param string
  * @return HatenaSyntax_Node
  */
 static function parse($str)
 {
     return HatenaSyntax_Locator::it()->parser->parse(self::context($str));
 }
예제 #3
0
<?php

include_once dirname(__FILE__) . '/../../t.php';
$t = new lime_test();
$p = HatenaSyntax_Locator::it()->lineElement;
$c = PEG::context('a');
$t->is($p->parse($c), 'a');