JCL Help:TExprLexer

From Project JEDI Wiki
Jump to navigationJump to search

Class Hierarchy

TExprLexer
|
TExprSimpleLexer


Summary

A lexical analyser.


Pascal

 public TExprLexer = class(TObject);


Description

An object of this class breaks up an input stream into lexemes - that is, it breaks down the input stream into tokens with two properties: type and content. The type describes what sort of token the current token is. The content gives further information about some tokens.
For example, if the incoming stream is 'a + 03.60', then the lexical analyser will break it down into 3 tokens:

The token type is given by the CurrTok property, and the token content is given by the TokenAsString and TokenAsNumber properties.
The current token is skipped and the next token loaded when the NextTok method is called. When the end of the input stream is found, CurrTok will be equal to etEof, and repeated calls of NextTok won't do anything (i.e. CurrTok will remain equal to etEof).


About

Unit

JclExprEval


Navigation

Donator

Barry Kelly


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page