Ejemplo n.º 1
0
 /**
  * Match
  *
  * | content | content |
  *
  * @param string                    $ruleNameName
  * @param \ViKon\Parser\Lexer\Lexer $lexer
  *
  * @return $this
  */
 public function embedInto($ruleNameName, Lexer $lexer)
 {
     parent::embedInto($ruleNameName, $lexer);
     // Match table row
     $lexer->addSimplePattern('\\n\\|?(?:[^|\\n]+\\|)+(?:[^|\\n]+\\|?)', $this->name);
     return $this;
 }
 /**
  * @param string                    $ruleNameName
  * @param \ViKon\Parser\Lexer\Lexer $lexer
  *
  * @return $this
  */
 public function embedInto($ruleNameName, Lexer $lexer)
 {
     parent::embedInto($ruleNameName, $lexer);
     // Match next list item indicator
     $lexer->addSimplePattern('(?:\\n[ \\t]*)*\\n(?: {2}|\\t)*(?:[\\-\\+\\*]|\\d+\\.)(?: |\\t)+', $this->name);
     // Match next line indicator
     $lexer->addSimplePattern('(?:\\n[ \\t]*)*\\n[ \\t]+', $this->name);
     return $this;
 }
 /**
  * Match
  *
  *     code block
  *
  *     code block
  *
  * @param string                    $ruleNameName
  * @param \ViKon\Parser\Lexer\Lexer $lexer
  *
  * @return $this
  */
 public function embedInto($ruleNameName, Lexer $lexer)
 {
     parent::embedInto($ruleNameName, $lexer);
     $lexer->addSimplePattern('(?:\\n[ \\t]*)*\\n(?: {4}|\\t)', $this->name);
     return $this;
 }