TFPExpressionScanner class
Class for tokenizing expression strings into parser tokens
Declaration
TFPExpressionScanner = class(TObject)Inheritance
- TFPExpressionScanner
- TObject
Description
The TFPExpressionScanner class performs lexical analysis on expression strings, breaking them into tokens that can be consumed by the expression parser.
It handles the low-level details of character recognition, string parsing, and token classification.
The scanner recognizes all token types defined in TTokenType including operators, literals, identifiers, keywords, and delimiters.
Properties
Token | public | The text of the current token |
TokenType | public | The type of the current token |
Source | public | The source expression string to scan |
Pos | public | Current position in the source string |
CurrentChar | public | The current character being processed |
Methods
SetSource | protected | |
DoIdentifier | protected | |
DoNumber | protected | |
DoDelimiter | protected | |
DoString | protected | |
NextPos | protected | |
SkipWhiteSpace | protected | |
IsWordDelim | protected | |
IsDelim | protected | |
IsDigit | protected | |
IsAlpha | protected | |
Create | public | Create a new expression scanner |
GetToken | public | Get the next token from the source expression |
Fields
FSource | ||
LSource | ||
FPos | ||
FChar | ||
FToken | ||
FTokenType |
Inherited
From TObject (41)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Destroy Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
