Constants |
public
PhpParser |
Methods |
public
__construct
(
PhpParser Creates a parser instance. Options: Currently none.
|
public
parse
(
string
$code
,
?
PhpParser Parses PHP code into a node tree. If a non-throwing error handler is used, the parser will continue parsing after an error
|
Properties |
protected
$action
|
protected
$actionBase
|
protected
$actionCheck
|
protected
$actionDefault
|
protected
$actionTableSize
|
protected
$defaultAction
|
protected
$endAttributes
|
protected
$endAttributeStack
|
protected
$errorHandler
|
protected
$errorState
|
protected
$errorSymbol
|
protected
$goto
|
protected
$gotoBase
|
protected
$gotoCheck
|
protected
$gotoDefault
|
protected
$gotoTableSize
|
protected
$invalidSymbol
|
protected
$lexer
|
protected
$lookaheadStartAttributes
|
protected
$numNonLeafStates
|
protected
$productions
|
protected
$reduceCallbacks
|
protected
$ruleToLength
|
protected
$ruleToNonTerminal
|
protected
$semStack
|
protected
$semValue
|
protected
$startAttributeStack
|
protected
$symbolToName
|
protected
$tokenToSymbol
|
protected
$tokenToSymbolMapSize
|
protected
$unexpectedTokenRule
|
protected $YY2TBLSTATE |
Methods |
protected
checkClass
(
PhpParser |
protected
checkClassConst
(
PhpParser |
protected
checkClassMethod
(
PhpParser |
protected
checkEnum
(
PhpParser |
protected
checkInterface
(
PhpParser |
protected checkModifier ( $a , $b , $modifierPos ) |
protected
checkNamespace
(
PhpParser |
protected
checkParam
(
PhpParser |
protected
checkProperty
(
PhpParser |
protected
checkTryCatch
(
PhpParser |
protected
checkUseUse
(
PhpParser |
protected
createCommentNopAttributes
(
array
$comments
) Create attributes for a zero-length common-capturing nop.
|
protected doParse () |
protected
emitError
(
PhpParser |
protected
fixupPhp5StaticPropCall
(
$prop
,
array
$args
,
array
$attributes
) :
PhpParser Fix up parsing of static property calls in PHP 5. In PHP 5 A::$b[c][d] and A::$b[c][d]() have very different interpretation. The former is
|
protected
fixupStartAttributes
(
PhpParser |
protected
getAttributesAt
(
int
$pos
) :
array
Get combined start and end attributes at a stack location
|
protected
getErrorMessage
(
int
$symbol
,
int
$state
) :
string
Format error message including expected tokens.
|
protected
getExpectedTokens
(
int
$state
) :
array
Get limited number of expected tokens in given state.
|
protected getFloatCastKind ( string $cast ) : int |
protected
handleBuiltinTypes
(
PhpParser |
protected
handleNamespaces
(
array
$stmts
) :
array
Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions.
|
protected
abstract
initReduceCallbacks
() Initialize $reduceCallbacks map. |
protected parseDocString ( string $startToken , $contents , string $endToken , array $attributes , array $endTokenAttributes , bool $parseUnicodeEscape ) |
protected parseLNumber ( $str , $attributes , $allowInvalidOctal = false ) |
protected
parseNumString
(
string
$str
,
array
$attributes
) Parse a T_NUM_STRING token into either an integer or string node.
|
protected stripIndentation ( string $string , int $indentLen , string $indentChar , bool $newlineAtStart , bool $newlineAtEnd , array $attributes ) |
Methods |
private checkClassName ( $name , $namePos ) |
private checkImplementedInterfaces ( array $interfaces ) |
private
fixupNamespaceAttributes
(
PhpParser |
private
getNamespacingStyle
(
array
$stmts
) Determine namespacing style (semicolon or brace)
|