Unit 'fpexprpars' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TFPExpressionScanner

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class for tokenizing expression strings into parser tokens

Declaration

Source position: fpexprpars.pp line 61

type TFPExpressionScanner = class(TObject)

  FSource: AnsiString;

  LSource: Integer;

  FPos: Integer;

  FChar: PAnsiChar;

  FToken: AnsiString;

  FTokenType: TTokenType;

public

  constructor Create;

  

Create a new expression scanner

  function GetToken;

  

Get the next token from the source expression

  property Token: AnsiString; [r]

  

The text of the current token

  property TokenType: TTokenType; [r]

  

The type of the current token

  property Source: AnsiString; [rw]

  

The source expression string to scan

  property Pos: Integer; [r]

  

Current position in the source string

  property CurrentChar: AnsiChar; [r]

  

The current character being processed

end;

Inheritance

TFPExpressionScanner

  

Class for tokenizing expression strings into parser tokens

|

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.


Documentation generated on: Dec 15 2025