Unit Parser10 |
*******************************************************} { } { TParser 10.1 for Borland Delphi } { } { A component for parsing and evaluating } { mathematical expressions specified at runtime } { } { Renate Schaaf (schaaf@math.usu.edu), 1993 } { Alin Flaider (aflaidar@datalog.ro), 1996 } { Stefan Hoffmeister } { Stefan.Hoffmeister@Uni-Passau.de, 1997 } { } { } { See PARSER10.TXT for documentation } { } {
Classes |
TCustomParser -
TParser -
Functions |
Register - Note: if you do not have the MATH unit simply remove the conditional define
the component will continue to work, just a bit slower
Types |
ParserFloat
POperation
PParserFloat
TMathProcedure
TOperation
TParserExceptionEvent
TToken
Constants |
Variables |
Functions |
Types |
ParserFloat = doublea couple of unfortunately necessary global declarations
POperation = ^TOperation
PParserFloat = ^ParserFloatplease do NOT use "real", only single, double, extended
TMathProcedure = procedure(AnOperation: POperation)functions that are added to the engine MUST have this declaration } { make sure that the procedure is declared far !!!
TOperation = record
Arg1 : PParserFloat;
Arg2 : PParserFloat;
Dest : PParserFloat;
NextOperation : POperation;
Operation : TMathProcedure;
Token : TToken;
end;
TParserExceptionEvent = procedure (Sender: TObject; E: Exception) of objecthopefully we will never see this one } { we COULD use Forms and the TExceptionEvent therein, but that would give us all the VCL overhead. Consequentially we just redeclare an appropriate event
TToken=( variab, constant, minus, sum, diff, prod, divis, modulo, IntDiv, integerpower, realpower, square, third, fourth, FuncOneVar, FuncTwoVar);
Constants |
Variables |