Changeset 100 for branches/interpreter/Source3.pas
- Timestamp:
- Feb 11, 2017, 12:47:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter/Source3.pas
r99 r100 15 15 PExecution = ^TExecution; 16 16 17 TOperator = (opNone, opAdd, opSubtract, opAnd, opOr, opNot, opEqual, opNotEqual); 18 17 19 TBaseType = (btBoolean, btInteger, btChar, btShortString, btArray); 18 20 … … 48 50 49 51 TConstant = record 50 Name: s tring;52 Name: shortstring; 51 53 DataType: PType; 52 54 Index: Integer; … … 85 87 TCommand = record 86 88 CmdType: TCmdType; 87 Ptr: Pointer;88 89 case Integer of 89 90 0: (WhileDo: PWhileDo); … … 103 104 end; 104 105 105 TReadType = (rtVariable, rtConstant, rtExpression, rtFunctionCall );106 TReadType = (rtVariable, rtConstant, rtExpression, rtFunctionCall, rtValue); 106 107 TGetValue = record 107 108 ReadType: TReadType; … … 111 112 rtExpression: (Expression: PExpression); 112 113 rtFunctionCall: (FunctionCall: PExecution); 114 rtValue: (Value: TConstant); 113 115 end; 114 116 PGetValue = ^TGetValue; 115 117 116 TExp Operand = (eoNone, eoAdd, eoSubtract, eoAnd, eoOr, eoNot);118 TExpNodeType = (ntNone, ntValue, ntOperator); 117 119 118 120 TExpression = record 119 Operand: TExpOperand; 120 Items: array of TGetValue; 121 NodeType: TExpNodeType; 122 OperatorType: TOperator; 123 Items: array of TExpression; 124 Value: TGetValue; 125 Parentheses: Boolean; 126 Associated: Boolean; 121 127 end; 122 128 … … 181 187 function FunctionParameterCreate(Name: string; DataType: PType): TFunctionParameter; 182 188 189 var 190 OperatorString: array[TOperator] of string = ('', '+', '-', 'and', 'or', 'not', 191 '=', '<>'); 192 193 const 194 OperatorPrecedence: array[0..6] of TOperator = (opNot, opAnd, opOr, opAdd, 195 opSubtract, opEqual, opNotEqual); 196 183 197 184 198 implementation
Note:
See TracChangeset
for help on using the changeset viewer.