|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Collaboration diagram for PHPExcel_Writer_Excel5_Parser:Public Member Functions | |
| __construct () | |
| The class constructor. More... | |
| _initializeHashes () | |
| Initialize the ptg and function hashes. More... | |
| _convert ($token) | |
| Convert a token to the proper ptg value. More... | |
| _convertNumber ($num) | |
| Convert a number token to ptgInt or ptgNum. More... | |
| _convertString ($string) | |
| Convert a string token to ptgStr. More... | |
| _convertFunction ($token, $num_args) | |
| Convert a function to a ptgFunc or ptgFuncVarV depending on the number of args that it takes. More... | |
| _convertRange2d ($range, $class=0) | |
| Convert an Excel range such as A1:D4 to a ptgRefV. More... | |
| _convertRange3d ($token) | |
| Convert an Excel 3d range such as "Sheet1!A1:D4" or "Sheet1:Sheet2!A1:D4" to a ptgArea3d. More... | |
| _convertRef2d ($cell) | |
| Convert an Excel reference such as A1, $B2, C$3 or $D$4 to a ptgRefV. More... | |
| _convertRef3d ($cell) | |
| Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a ptgRef3d. More... | |
| _convertError ($errorCode) | |
| Convert an error code to a ptgErr. More... | |
| _packExtRef ($ext_ref) | |
| Convert the sheet name part of an external reference, for example "Sheet1" or "Sheet1:Sheet2", to a packed structure. More... | |
| _getRefIndex ($ext_ref) | |
| Look up the REF index that corresponds to an external sheet name (or range). More... | |
| _getSheetIndex ($sheet_name) | |
| Look up the index that corresponds to an external sheet name. More... | |
| setExtSheet ($name, $index) | |
| This method is used to update the array of sheet names. More... | |
| _cellToPackedRowcol ($cell) | |
| pack() row and column into the required 3 or 4 byte format. More... | |
| _rangeToPackedRange ($range) | |
| pack() row range into the required 3 or 4 byte format. More... | |
| _cellToRowcol ($cell) | |
| Convert an Excel cell reference such as A1 or $B2 or C$3 or $D$4 to a zero indexed row and column number. More... | |
| _advance () | |
| Advance to the next valid token. More... | |
| _match ($token) | |
| Checks if it's a valid token. More... | |
| parse ($formula) | |
| The parsing method. More... | |
| _condition () | |
| It parses a condition. More... | |
| _expression () | |
| It parses a expression. More... | |
| _parenthesizedExpression () | |
| This function just introduces a ptgParen element in the tree, so that Excel doesn't get confused when working with a parenthesized formula afterwards. More... | |
| _term () | |
| It parses a term. More... | |
| _fact () | |
| It parses a factor. More... | |
| _func () | |
| It parses a function call. More... | |
| _createTree ($value, $left, $right) | |
| Creates a tree. More... | |
| toReversePolish ($tree=array()) | |
| Builds a string containing the tree in reverse polish notation (What you would use in a HP calculator stack). More... | |
Data Fields | |
| const | REGEX_SHEET_TITLE_UNQUOTED = '[^\*\:\/\\\\\?\[\]\+\-\% \\\'\^\&<>\=\,\;\#\(\)\"\{\}]+' |
| Constants More... | |
| const | REGEX_SHEET_TITLE_QUOTED = '(([^\*\:\/\\\\\?\[\]\\\'])+|(\\\'\\\')+)+' |
| $_current_char | |
| $_current_token | |
| $_formula | |
| $_lookahead | |
| $_parse_tree | |
| $_ext_sheets | |
| $_references | |
Definition at line 60 of file Parser.php.
| PHPExcel_Writer_Excel5_Parser::__construct | ( | ) |
The class constructor.
Definition at line 122 of file Parser.php.
References _initializeHashes().
Here is the call graph for this function:| PHPExcel_Writer_Excel5_Parser::_advance | ( | ) |
Advance to the next valid token.
@access private
Definition at line 1040 of file Parser.php.
References $_current_char, $i, and _match().
Referenced by _condition(), _expression(), _fact(), _func(), _term(), and parse().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_cellToPackedRowcol | ( | $cell | ) |
pack() row and column into the required 3 or 4 byte format.
@access private
| string | $cell | The Excel cell reference to be packed |
Definition at line 940 of file Parser.php.
References $row, and _cellToRowcol().
Referenced by _convertRange2d(), _convertRange3d(), _convertRef2d(), and _convertRef3d().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_cellToRowcol | ( | $cell | ) |
Convert an Excel cell reference such as A1 or $B2 or C$3 or $D$4 to a zero indexed row and column number.
Also returns two (0,1) values to indicate whether the row or column are relative references.
@access private
| string | $cell | The Excel cell reference in A1 format. |
Definition at line 1010 of file Parser.php.
Referenced by _cellToPackedRowcol().
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_condition | ( | ) |
It parses a condition.
It assumes the following rule: Cond -> Expr [(">" | "<") Expr]
@access private
Definition at line 1221 of file Parser.php.
References $result, _advance(), _createTree(), and _expression().
Referenced by _func(), and parse().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_convert | ( | $token | ) |
Convert a token to the proper ptg value.
@access private
| mixed | $token | The token to convert. |
Definition at line 515 of file Parser.php.
References _convertError(), _convertNumber(), _convertRange2d(), _convertRange3d(), _convertRef2d(), _convertRef3d(), and _convertString().
Referenced by toReversePolish().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_convertError | ( | $errorCode | ) |
Convert an error code to a ptgErr.
@access private
| string | $errorCode | The error code for conversion to its ptg value |
Definition at line 782 of file Parser.php.
References $errorCode.
Referenced by _convert().
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_convertFunction | ( | $token, | |
| $num_args | |||
| ) |
Convert a function to a ptgFunc or ptgFuncVarV depending on the number of args that it takes.
@access private
| string | $token | The name of the function for convertion to ptg value. |
| integer | $num_args | The number of arguments the function receives. |
Definition at line 616 of file Parser.php.
| PHPExcel_Writer_Excel5_Parser::_convertNumber | ( | $num | ) |
Convert a number token to ptgInt or ptgNum.
@access private
| mixed | $num | an integer or double for conversion to its ptg value |
Definition at line 576 of file Parser.php.
References PHPExcel_Writer_Excel5_BIFFwriter\getByteOrder().
Referenced by _convert().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_convertRange2d | ( | $range, | |
$class = 0 |
|||
| ) |
Convert an Excel range such as A1:D4 to a ptgRefV.
@access private
| string | $range | An Excel range in the A1:A2 |
| int | $class |
Definition at line 638 of file Parser.php.
References _cellToPackedRowcol().
Referenced by _convert().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_convertRange3d | ( | $token | ) |
Convert an Excel 3d range such as "Sheet1!A1:D4" or "Sheet1:Sheet2!A1:D4" to a ptgArea3d.
@access private
| string | $token | An Excel range in the Sheet1!A1:A2 format. |
Definition at line 676 of file Parser.php.
References _cellToPackedRowcol(), _getRefIndex(), and _rangeToPackedRange().
Referenced by _convert().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_convertRef2d | ( | $cell | ) |
Convert an Excel reference such as A1, $B2, C$3 or $D$4 to a ptgRefV.
@access private
| string | $cell | An Excel cell reference |
Definition at line 718 of file Parser.php.
References $row, and _cellToPackedRowcol().
Referenced by _convert().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_convertRef3d | ( | $cell | ) |
Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a ptgRef3d.
@access private
| string | $cell | An Excel cell reference |
Definition at line 748 of file Parser.php.
References $row, _cellToPackedRowcol(), and _getRefIndex().
Referenced by _convert().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_convertString | ( | $string | ) |
Convert a string token to ptgStr.
@access private
| string | $string | A string for conversion to its ptg value. |
Definition at line 596 of file Parser.php.
References PHPExcel_Shared_String\UTF8toBIFF8UnicodeShort().
Referenced by _convert().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_createTree | ( | $value, | |
| $left, | |||
| $right | |||
| ) |
Creates a tree.
In fact an array which may have one or two arrays (sub-trees) as elements.
@access private
| mixed | $value | The value of this node. |
| mixed | $left | The left array (sub-tree) or a final node. |
| mixed | $right | The right array (sub-tree) or a final node. |
Definition at line 1508 of file Parser.php.
Referenced by _condition(), _expression(), _fact(), _func(), _parenthesizedExpression(), and _term().
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_expression | ( | ) |
It parses a expression.
It assumes the following rule: Expr -> Term [("+" | "-") Term] -> "string" -> "-" Term : Negative value -> "+" Term : Positive value -> Error code
@access private
Definition at line 1267 of file Parser.php.
References $result, _advance(), _createTree(), _expression(), and _term().
Referenced by _condition(), _expression(), and _parenthesizedExpression().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_fact | ( | ) |
It parses a factor.
It assumes the following rule: Fact -> ( Expr ) | CellRef | CellRange | Number | Function
@access private
Definition at line 1369 of file Parser.php.
References $result, _advance(), _createTree(), _func(), and _parenthesizedExpression().
Referenced by _term().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_func | ( | ) |
It parses a function call.
It assumes the following rule: Func -> ( Expr [,Expr]* )
@access private
Definition at line 1458 of file Parser.php.
References $function, $result, _advance(), _condition(), and _createTree().
Referenced by _fact().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_getRefIndex | ( | $ext_ref | ) |
Look up the REF index that corresponds to an external sheet name (or range).
If it doesn't exist yet add it to the workbook's references array. It assumes all sheet names given must exist.
@access private
| string | $ext_ref | The name of the external reference |
Definition at line 849 of file Parser.php.
References $i, $index, and _getSheetIndex().
Referenced by _convertRange3d(), and _convertRef3d().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_getSheetIndex | ( | $sheet_name | ) |
Look up the index that corresponds to an external sheet name.
The hash of sheet names is updated by the addworksheet() method of the PHPExcel_Writer_Excel5_Workbook class.
@access private
| string | $sheet_name | Sheet name |
Definition at line 909 of file Parser.php.
Referenced by _getRefIndex(), and _packExtRef().
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_initializeHashes | ( | ) |
Initialize the ptg and function hashes.
@access private
Definition at line 139 of file Parser.php.
Referenced by __construct().
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_match | ( | $token | ) |
Checks if it's a valid token.
@access private
| mixed | $token | The token to check. |
Definition at line 1091 of file Parser.php.
Referenced by _advance().
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_packExtRef | ( | $ext_ref | ) |
Convert the sheet name part of an external reference, for example "Sheet1" or "Sheet1:Sheet2", to a packed structure.
@access private
| string | $ext_ref | The name of the external reference |
Definition at line 804 of file Parser.php.
References _getSheetIndex().
Here is the call graph for this function:| PHPExcel_Writer_Excel5_Parser::_parenthesizedExpression | ( | ) |
This function just introduces a ptgParen element in the tree, so that Excel doesn't get confused when working with a parenthesized formula afterwards.
@access private
Definition at line 1326 of file Parser.php.
References $result, _createTree(), and _expression().
Referenced by _fact().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_rangeToPackedRange | ( | $range | ) |
pack() row range into the required 3 or 4 byte format.
Just using maximum col/rows, which is probably not the correct solution
@access private
| string | $range | The Excel range to be packed |
Definition at line 969 of file Parser.php.
Referenced by _convertRange3d().
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::_term | ( | ) |
It parses a term.
It assumes the following rule: Term -> Fact [("*" | "/") Fact]
@access private
Definition at line 1339 of file Parser.php.
References $result, _advance(), _createTree(), and _fact().
Referenced by _expression().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::parse | ( | $formula | ) |
The parsing method.
It parses a formula.
@access public
| string | $formula | The formula to parse, without the initial equal sign (=). |
Definition at line 1204 of file Parser.php.
References _advance(), and _condition().
Here is the call graph for this function:| PHPExcel_Writer_Excel5_Parser::setExtSheet | ( | $name, | |
| $index | |||
| ) |
This method is used to update the array of sheet names.
It is called by the addWorksheet() method of the PHPExcel_Writer_Excel5_Workbook class.
@access public
| string | $name | The name of the worksheet being added |
| integer | $index | The index of the worksheet being added |
Definition at line 928 of file Parser.php.
| PHPExcel_Writer_Excel5_Parser::toReversePolish | ( | $tree = array() | ) |
Builds a string containing the tree in reverse polish notation (What you would use in a HP calculator stack).
The following tree:
produces: "23+"
The following tree:
produces: "36A1*+"
In fact all operands, functions, references, etc... are written as ptg's
@access public
| array | $tree | The optional tree to convert. |
Definition at line 1540 of file Parser.php.
References $_parse_tree, _convert(), and toReversePolish().
Referenced by toReversePolish().
Here is the call graph for this function:
Here is the caller graph for this function:| PHPExcel_Writer_Excel5_Parser::$_current_char |
Definition at line 80 of file Parser.php.
Referenced by _advance().
| PHPExcel_Writer_Excel5_Parser::$_current_token |
Definition at line 86 of file Parser.php.
| PHPExcel_Writer_Excel5_Parser::$_ext_sheets |
Definition at line 110 of file Parser.php.
| PHPExcel_Writer_Excel5_Parser::$_formula |
Definition at line 92 of file Parser.php.
| PHPExcel_Writer_Excel5_Parser::$_lookahead |
Definition at line 98 of file Parser.php.
| PHPExcel_Writer_Excel5_Parser::$_parse_tree |
Definition at line 104 of file Parser.php.
Referenced by toReversePolish().
| PHPExcel_Writer_Excel5_Parser::$_references |
Definition at line 116 of file Parser.php.
| const PHPExcel_Writer_Excel5_Parser::REGEX_SHEET_TITLE_QUOTED = '(([^\*\:\/\\\\\?\[\]\\\'])+|(\\\'\\\')+)+' |
Definition at line 74 of file Parser.php.
| const PHPExcel_Writer_Excel5_Parser::REGEX_SHEET_TITLE_UNQUOTED = '[^\*\:\/\\\\\?\[\]\+\-\% \\\'\^\&<>\=\,\;\#\(\)\"\{\}]+' |
Constants
Definition at line 68 of file Parser.php.