diff options
author | Gerry Weißbach <gerry.w@gammaproduction.de> | 2014-12-22 10:31:30 +0100 |
---|---|---|
committer | Gerry Weißbach <gerry.w@gammaproduction.de> | 2014-12-22 10:31:30 +0100 |
commit | 8da2ebf4f4261eb8f54df5704b5d9af283b5402d (patch) | |
tree | 9c63975e3898c949e1784e30e81a5ed3da7fca93 /inc/parser/lexer.php | |
parent | 5e7f4d50cbbc788c9c0483a0a2ff1b536e4ffe8c (diff) | |
parent | 1bf4abb07f65e28578bae98aad457cb768d8b44f (diff) | |
download | rpg-8da2ebf4f4261eb8f54df5704b5d9af283b5402d.tar.gz rpg-8da2ebf4f4261eb8f54df5704b5d9af283b5402d.tar.bz2 |
Merge remote-tracking branch 'splitbrain/master'
Diffstat (limited to 'inc/parser/lexer.php')
-rw-r--r-- | inc/parser/lexer.php | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/inc/parser/lexer.php b/inc/parser/lexer.php index 2e84eca7c..b46a5f505 100644 --- a/inc/parser/lexer.php +++ b/inc/parser/lexer.php @@ -56,12 +56,12 @@ class Doku_LexerParallelRegex { /** * Adds a pattern with an optional label. * - * @param mixed $pattern Perl style regex. Must be UTF-8 + * @param mixed $pattern Perl style regex. Must be UTF-8 * encoded. If its a string, the (, ) * lose their meaning unless they * form part of a lookahead or * lookbehind assertation. - * @param string $label Label of regex to be returned + * @param bool|string $label Label of regex to be returned * on a match. Label must be ASCII * @access public */ @@ -151,7 +151,8 @@ class Doku_LexerParallelRegex { * "or" operator. Caches the regex. * Will automatically escape (, ) and / tokens. * - * @param array $patterns List of patterns in order. + * @internal array $_patterns List of patterns in order. + * @return null|string * @access private */ function _getCompoundedRegex() { @@ -297,6 +298,7 @@ class Doku_Lexer { */ function Doku_Lexer(&$parser, $start = "accept", $case = false) { $this->_case = $case; + /** @var Doku_LexerParallelRegex[] _regexes */ $this->_regexes = array(); $this->_parser = &$parser; $this->_mode = new Doku_LexerStateStack($start); @@ -425,11 +427,13 @@ class Doku_Lexer { * Sends the matched token and any leading unmatched * text to the parser changing the lexer to a new * mode if one is listed. - * @param string $unmatched Unmatched leading portion. - * @param string $matched Actual token match. - * @param string $mode Mode after match. A boolean + * @param string $unmatched Unmatched leading portion. + * @param string $matched Actual token match. + * @param bool|string $mode Mode after match. A boolean * false mode causes no change. - * @param int $pos Current byte index location in raw doc + * @param int $initialPos + * @param int $matchPos + * Current byte index location in raw doc * thats being parsed * @return boolean False if there was any error * from the parser. @@ -498,11 +502,12 @@ class Doku_Lexer { * Calls the parser method named after the current * mode. Empty content will be ignored. The lexer * has a parser handler for each mode in the lexer. - * @param string $content Text parsed. - * @param boolean $is_match Token is recognised rather + * @param string $content Text parsed. + * @param boolean $is_match Token is recognised rather * than unparsed data. - * @param int $pos Current byte index location in raw doc + * @param int $pos Current byte index location in raw doc * thats being parsed + * @return bool * @access private */ function _invokeParser($content, $is_match, $pos) { |