ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
PARTLY BASED ON: Copyright (c) 2007 E. More...
Public Member Functions | |
__construct ($pFormula='') | |
Create a new FormulaParser. More... | |
getFormula () | |
Get Formula. More... | |
getToken (int $pId=0) | |
Get Token. More... | |
getTokenCount () | |
Get Token count. More... | |
getTokens () | |
Get Tokens. More... | |
Data Fields | |
const | QUOTE_DOUBLE = '"' |
const | QUOTE_SINGLE = '\'' |
const | BRACKET_CLOSE = ']' |
const | BRACKET_OPEN = '[' |
const | BRACE_OPEN = '{' |
const | BRACE_CLOSE = '}' |
const | PAREN_OPEN = '(' |
const | PAREN_CLOSE = ')' |
const | SEMICOLON = ';' |
const | WHITESPACE = ' ' |
const | COMMA = ',' |
const | ERROR_START = '#' |
const | OPERATORS_SN = '+-' |
const | OPERATORS_INFIX = '+-*/^&=><' |
const | OPERATORS_POSTFIX = '%' |
Private Member Functions | |
parseToTokens () | |
Parse to tokens. More... | |
Private Attributes | |
$formula | |
$tokens = [] | |
PARTLY BASED ON: Copyright (c) 2007 E.
W. Bachtal, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
https://ewbi.blogs.com/develops/2007/03/excel_formula_p.html https://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
Definition at line 27 of file FormulaParser.php.
PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::__construct | ( | $pFormula = '' | ) |
Create a new FormulaParser.
string | $pFormula | Formula to parse |
Definition at line 66 of file FormulaParser.php.
References PhpOffice\PhpSpreadsheet\Calculation\FormulaParser\parseToTokens().
PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::getFormula | ( | ) |
Get Formula.
Definition at line 84 of file FormulaParser.php.
References PhpOffice\PhpSpreadsheet\Calculation\FormulaParser\$formula.
PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::getToken | ( | int | $pId = 0 | ) |
PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::getTokenCount | ( | ) |
PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::getTokens | ( | ) |
Get Tokens.
Definition at line 118 of file FormulaParser.php.
References PhpOffice\PhpSpreadsheet\Calculation\FormulaParser\$tokens.
|
private |
Parse to tokens.
Definition at line 126 of file FormulaParser.php.
References $i, $index, PHPMailer\PHPMailer\$token, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_CONCATENATION, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_ERROR, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_INTERSECTION, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_LOGICAL, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_MATH, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_NOTHING, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_NUMBER, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_RANGE, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_START, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_STOP, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_TEXT, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_SUBTYPE_UNION, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_ARGUMENT, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_FUNCTION, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_OPERAND, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_OPERATORINFIX, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_OPERATORPOSTFIX, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_OPERATORPREFIX, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_SUBEXPRESSION, PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_UNKNOWN, and PhpOffice\PhpSpreadsheet\Calculation\FormulaToken\TOKEN_TYPE_WHITESPACE.
Referenced by PhpOffice\PhpSpreadsheet\Calculation\FormulaParser\__construct().
|
private |
Definition at line 52 of file FormulaParser.php.
Referenced by PhpOffice\PhpSpreadsheet\Calculation\FormulaParser\getFormula().
|
private |
Definition at line 59 of file FormulaParser.php.
Referenced by PhpOffice\PhpSpreadsheet\Calculation\FormulaParser\getTokens().
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::BRACE_CLOSE = '}' |
Definition at line 35 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::BRACE_OPEN = '{' |
Definition at line 34 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::BRACKET_CLOSE = ']' |
Definition at line 32 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::BRACKET_OPEN = '[' |
Definition at line 33 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::COMMA = ',' |
Definition at line 40 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::ERROR_START = '#' |
Definition at line 41 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::OPERATORS_INFIX = '+-*/^&=><' |
Definition at line 44 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::OPERATORS_POSTFIX = '%' |
Definition at line 45 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::OPERATORS_SN = '+-' |
Definition at line 43 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::PAREN_CLOSE = ')' |
Definition at line 37 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::PAREN_OPEN = '(' |
Definition at line 36 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::QUOTE_DOUBLE = '"' |
Definition at line 30 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::QUOTE_SINGLE = '\'' |
Definition at line 31 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::SEMICOLON = ';' |
Definition at line 38 of file FormulaParser.php.
const PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::WHITESPACE = ' ' |
Definition at line 39 of file FormulaParser.php.