$allowsMutation
$allowsMutation
Class Parser
$events : \WikiLingo\Events
$variableContextStack : \WikiLingo\Utilities\Stack
variable context stack
preParse(mixed $input)
Event just before $this->parse($input), used to ready parser, ensuring defaults needed for parsing are set.
pcre.recursion_limit is temporarily changed here. php default is 100,000 which is just too much for this type of parser. The reason for this code is the use of preg_* functions using pcre library. Some of the regex needed is just too much for php to handle, so by limiting this for regex we speed up the parser and allow it to safely lex/parse a string more here: http://stackoverflow.com/questions/7620910/regexp-in-preg-match-function-returning-browser-error
mixed | $input |
postParse(\WikiLingo\Parsed $parsed) : string
Where what has been parsed is then rendered
\WikiLingo\Parsed | $parsed |
lexerError( $str, \WikiLingo\LexerError $hash)
$str | ||
\WikiLingo\LexerError | $hash |
parseError( $str, \WikiLingo\ParserError $hash)
$str | ||
\WikiLingo\ParserError | $hash |
isContent(array $skipTypes) : string
Detects if we are in a state that we can call the lexed grammer 'content'. Since the execution technique from the parser is inside-out, this helps us reverse the execution from outside-in in some cases.
array | $skipTypes |
true if content is current not parse-able
syntax(\WikiLingo\ParserLocation $startLoc, \WikiLingo\ParserLocation $endLoc) : string
\WikiLingo\ParserLocation | $startLoc | |
\WikiLingo\ParserLocation | $endLoc |
syntaxBetween(\WikiLingo\ParserLocation $startLoc, \WikiLingo\ParserLocation $endLoc) : string
\WikiLingo\ParserLocation | $startLoc | |
\WikiLingo\ParserLocation | $endLoc |