Sign in Join
FPDoc Onlineexperiment

TFPExpressionScanner class

In unit fpExprPars

Class for tokenizing expression strings into parser tokens

Declaration

pascal
TFPExpressionScanner = class(TObject)

Inheritance

  1. TFPExpressionScanner
  2. 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

TokenpublicThe text of the current token
TokenTypepublicThe type of the current token
SourcepublicThe source expression string to scan
PospublicCurrent position in the source string
CurrentCharpublicThe current character being processed

Methods

SetSourceprotected
DoIdentifierprotected
DoNumberprotected
DoDelimiterprotected
DoStringprotected
NextPosprotected
SkipWhiteSpaceprotected
IsWordDelimprotected
IsDelimprotected
IsDigitprotected
IsAlphaprotected
CreatepublicCreate a new expression scanner
GetTokenpublicGet 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.