Пример #1
0
 public function __construct(PEG_IParser $elt)
 {
     $dt = PEG::many(PEG::subtract($elt, ':'));
     $dd = PEG::many($elt);
     $this->parser = PEG::many1(PEG::callbackAction(array($this, 'map'), PEG::anything()));
     $this->definitionList = PEG::seq(PEG::drop('-'), $dt, PEG::drop(':'), $dd);
 }
Пример #2
0
 function __construct(PEG_IParser $elt)
 {
     $this->line = PEG::many($elt);
     $end = new HatenaSyntax_Regex('/\\|<$/');
     $this->parser = PEG::callbackAction(array($this, 'map'), PEG::seq(PEG::drop('>|'), PEG::many(PEG::subtract(PEG::anything(), $end)), $end));
 }
Пример #3
0
 public function __construct(PEG_IParser $lineelt)
 {
     $this->parser = PEG::callbackAction(array($this, 'map'), PEG::anything());
     $this->line = PEG::many($lineelt);
 }
Пример #4
0
 function __construct(PEG_IParser $child)
 {
     $this->child = $child;
     $this->parser = PEG::seq(PEG::callbackAction(array($this, 'mapHeader'), PEG::anything()), PEG::many(PEG::subtract($this->child, '<<')), PEG::drop('<<'));
 }
Пример #5
0
 function __construct(PEG_IParser $lineelt)
 {
     $cellbody = PEG::many(PEG::subtract($lineelt, '|'));
     $this->parser = PEG::many1(PEG::callbackAction(array($this, 'map'), PEG::anything()));
     $this->line = PEG::second('|', PEG::many1(PEG::optional('*'), $cellbody, PEG::drop('|')), PEG::eos());
 }
Пример #6
0
 function header()
 {
     return PEG::callbackAction(array($this, 'mapHeader'), PEG::anything());
 }
Пример #7
0
 public function __construct(PEG_IParser $lineelt)
 {
     $item = PEG::callbackAction(array($this, 'mapLine'), PEG::anything());
     $this->parser = PEG::callbackAction(array('OrgModeSyntax_Tree', 'make'), PEG::many1($item));
     $this->li = PEG::callbackAction(array('OrgModeSyntax_Util', 'processListItem'), PEG::seq(PEG::many(PEG::char('+')), PEG::many($lineelt)));
 }
Пример #8
0
 function __construct(PEG_IParser $elt)
 {
     $this->child = PEG::many($elt);
     $this->parser = PEG::callbackAction(array($this, 'map'), PEG::anything());
 }