Element index for package Parser
[ a ]
[ b ]
[ c ]
[ e ]
[ g ]
[ m ]
[ n ]
[ o ]
[ p ]
[ r ]
[ s ]
[ t ]
[ _ ]
_
- _default
- in file Tokenizer.php, method Tokenizer::_default()
This is the default token handler. It handles all tokens that haven't been assigned custom callback functions.
- _default
- in file Parser.php, method Parser::_default()
This is the default token handler. It merely returns
top
a
- addCallback
- in file Tokenizer.php, method Tokenizer::addCallback()
Adds a callback $function for the specified $token.
- addInternal
- in file Parser.php, method Parser::addInternal()
Alias of addToken().
- addToken
- in file Parser.php, method Parser::addToken()
Defines a token whose callback function has the same name as
- append
- in file Buffer.php, method Buffer::append()
Appends to a buffer value. Same rules as set() apply
top
b
- $buffers
- in file Buffer.php, variable Buffer::$buffers
The array buffer.
- Buffer
- in file Buffer.php, class Buffer
Buffer implements string, array, and tree structure buffering for classes extending saf.Parser. This makes management of cumulative data easier during the analysis of a big ugly pile of tokens.
- Buffer.php
- procedural page Buffer.php
top
c
- $code
- in file Tokenizer.php, variable Tokenizer::$code
Stores the code that is passed to the previous call to parse().
- clear
- in file Buffer.php, method Buffer::clear()
Clears a buffer value.
top
e
- $error
- in file Tokenizer.php, variable Tokenizer::$error
Contains the message if an error occurs.
top
g
- get
- in file Buffer.php, method Buffer::get()
Retrieves the specified value from the buffers.
- getAll
- in file Buffer.php, method Buffer::getAll()
Returns the entire $buffers array.
top
m
- makeRegex
- in file Parser.php, method Parser::makeRegex()
Turns the $tokens list into a regular expression.
top
n
- normalize
- in file Tokenizer.php, method Tokenizer::normalize()
Fixes some quirks and exceptions to the structure of the output of the PHP token_get_all() function.
top
o
- $original
- in file Parser.php, variable Parser::$original
Contains the original data sent to parse().
- $output
- in file Parser.php, variable Parser::$output
Contains the output of parse().
- $output
- in file Buffer.php, variable Buffer::$output
The string buffer.
top
p
- parse
- in file Parser.php, method Parser::parse()
This is the mainloop of the parser.
- parse
- in file Tokenizer.php, method Tokenizer::parse()
Parses the specified $code and calls the callback method assigned to each token type.
- Parser
- in file Parser.php, method Parser::Parser()
Constructor method.
- Parser
- in file Parser.php, class Parser
Generic parser class from which new and complex parsers can be derived.
- Parser.php
- procedural page Parser.php
- prepend
- in file Buffer.php, method Buffer::prepend()
Preppends to a buffer value. Note: On unnamed arrays, append() appends the value to the end of the array, and not to the start of an element in the array.
top
r
- $regex
- in file Parser.php, variable Parser::$regex
Contains the output of makeRegex() on the current token list.
top
s
- $struct
- in file Parser.php, variable Parser::$struct
Contains the array of parsed elements, aka tokens.
- $switches
- in file Parser.php, variable Parser::$switches
Contains a list of switches to the preg_split() and
- set
- in file Buffer.php, method Buffer::set()
Sets a buffer value. If only one parameter is passed, it will assume that you want it to go into the $output property.
top
t
- $tokens
- in file Parser.php, variable Parser::$tokens
Contains all registered tokens as hashes containing 'name', 'token', 'callback', and 'object' keys.
- $tokens
- in file Tokenizer.php, variable Tokenizer::$tokens
Stores the tokens from the previous call to parse()
- Tokenizer.php
- procedural page Tokenizer.php
- Tokenizer
- in file Tokenizer.php, class Tokenizer
Tokenizer provides an saf.Parser-like wrapper around the PHP tokenizer extension that can be extended for token analysis and parser writing.
top
|
|