JCL Help:TExprSym

From Project JEDI Wiki
Jump to navigationJump to search

Class Hierarchy

TExprSym
|
TExprAbstractFuncSym
|
TExprConst32Sym
|
TExprConst64Sym
|
TExprConst80Sym
|
TExprConstSym
|
TExprVar32Sym
|
TExprVar64Sym
|
TExprVar80Sym


Summary

Represents a symbol that may be found in an input stream.


Pascal

 public TExprSym = class(TObject);


Description

An instance of this class is responsible for turning input lexemes (from the lexer) into either a concrete result (Evaluate) or expression nodes (Compile).
Because this class has state (properties like Lexer, EvalParser, CompileParser, NodeFactory), a symbol should never be used by two threads simultaneously. This design decision was taken to maximize ease of creating new symbols.
It is, however, safe to implement recursive symbols (i.e. a symbol that calls itself, even though it might be through another evaluator with different Lexer etc.) because the state is saved before Evaluate or Compile is called, and restored afterwards.


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