class FormulaToken (View source)

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

Constants

TOKEN_TYPE_NOOP

TOKEN_TYPE_OPERAND

TOKEN_TYPE_FUNCTION

TOKEN_TYPE_SUBEXPRESSION

TOKEN_TYPE_ARGUMENT

TOKEN_TYPE_OPERATORPREFIX

TOKEN_TYPE_OPERATORINFIX

TOKEN_TYPE_OPERATORPOSTFIX

TOKEN_TYPE_WHITESPACE

TOKEN_TYPE_UNKNOWN

TOKEN_SUBTYPE_NOTHING

TOKEN_SUBTYPE_START

TOKEN_SUBTYPE_STOP

TOKEN_SUBTYPE_TEXT

TOKEN_SUBTYPE_NUMBER

TOKEN_SUBTYPE_LOGICAL

TOKEN_SUBTYPE_ERROR

TOKEN_SUBTYPE_RANGE

TOKEN_SUBTYPE_MATH

TOKEN_SUBTYPE_CONCATENATION

TOKEN_SUBTYPE_INTERSECTION

TOKEN_SUBTYPE_UNION

Methods

__construct(string $pValue, string $pTokenType = self::TOKEN_TYPE_UNKNOWN, string $pTokenSubType = self::TOKEN_SUBTYPE_NOTHING)

Create a new FormulaToken.

string
getValue()

Get Value.

setValue(string $value)

Set Value.

string
getTokenType()

Get Token Type (represented by TOKEN_TYPE_*).

setTokenType(string $value)

Set Token Type (represented by TOKEN_TYPE_*).

string
getTokenSubType()

Get Token SubType (represented by TOKEN_SUBTYPE_*).

setTokenSubType(string $value)

Set Token SubType (represented by TOKEN_SUBTYPE_*).

Details

__construct(string $pValue, string $pTokenType = self::TOKEN_TYPE_UNKNOWN, string $pTokenSubType = self::TOKEN_SUBTYPE_NOTHING)

Create a new FormulaToken.

Parameters

string $pValue
string $pTokenType Token type (represented by TOKEN_TYPE_*)
string $pTokenSubType Token Subtype (represented by TOKEN_SUBTYPE_*)

string getValue()

Get Value.

Return Value

string

setValue(string $value)

Set Value.

Parameters

string $value

string getTokenType()

Get Token Type (represented by TOKEN_TYPE_*).

Return Value

string

setTokenType(string $value)

Set Token Type (represented by TOKEN_TYPE_*).

Parameters

string $value

string getTokenSubType()

Get Token SubType (represented by TOKEN_SUBTYPE_*).

Return Value

string

setTokenSubType(string $value)

Set Token SubType (represented by TOKEN_SUBTYPE_*).

Parameters

string $value