JCL Help:TExprLexer
JCL Help: TExprLexer Class
Search in JCL Help
Search in all projectsClass 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:
- type (CurrTok): etIdentifier; content: TokenAsString = 'a'
- type: etPlus; content: n/a
- type: etNumber; content: TokenAsNumber = 3.6, also TokenAsString = '03.60'
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
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