TFPExpressionParser class
Class for parsing and evaluating mathematical expressions
Declaration
TFPExpressionParser = class(TComponent)Inheritance
- TFPExpressionParser
- TComponent
- TPersistent
- TObject
Description
This is the main expression parser class that provides comprehensive functionality for parsing and evaluating mathematical expressions.
The parser handles the complete expression evaluation pipeline from tokenization through parsing to evaluation, supporting complex expressions with proper operator precedence, parentheses, function calls, and variable references.
Key features include built-in mathematical functions, string operations, date/time handling, boolean logic, comparison operations, and extensibility through custom functions and variables.
See also
Properties
Scanner | protected | |
ExprNode | protected | |
Dirty | protected | |
ExtractingIdentifiers | protected | |
AsFloat | public | Expression result as floating point value |
AsCurrency | public | Expression result as currency value |
AsInteger | public | Expression result as integer value |
AsString | public | Expression result as string value |
AsBoolean | public | Expression result as boolean value |
AsDateTime | public | Expression result as date/time value |
Expression | published | Expression string to be evaluated |
Identifiers | published | Collection of identifiers and their values |
BuiltIns | published | Manager for built-in functions and constants |
Methods
ParserError | protected | |
SetExpression | protected | |
CheckResultType | protected | |
CheckResultTypes | protected | |
ConvertNode | protected | |
BuiltinsManager | protected | |
Level1 | protected | |
Level2 | protected | |
Level3 | protected | |
Level4 | protected | |
Level5 | protected | |
Level6 | protected | |
Level7 | protected | |
Primitive | protected | |
GetToken | protected | |
TokenType | protected | |
CurrentToken | protected | |
CreateHashList | protected | |
Create | public | Create expression parser instance |
Destroy | public | Destroy expression parser and free resources |
IdentifierByName | public | Get identifier definition by name |
Clear | public | Clear the current expression |
EvaluateExpression | public | Evaluate the expression and return result |
ExtractIdentifierNames | public | |
ExtractNode | public | Extract expression node from result |
Evaluate | public | Evaluate the current expression |
ResultType | public | Get the result type of the expression |
HasAggregate | public | Check if expression contains aggregates |
InitAggregate | public | Initialize aggregate calculation |
UpdateAggregate | public | Update aggregate calculation with value |
Inherited
From TComponent (74)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (5)
Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
