| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288 |
- Listing:
- 1 IMPLEMENTATION MODULE StrLogic;
- 2 (*
- 3 * REPERTOIRE
- 4 * Release 1.6
- 5 * By Charles Bradford and Cole Brecheen
- 6 * (c) Copyright 1985-1992 PMI
- 7 * Green Bay, Wisconsin
- 8 * All rights reserved
- 9 * (414) 468-6040
- 10 *
- 11 * $Header: D:/logfiles/mods/strlogic.mov 1.5 10 Mar 1991 15:33:48 coleb $
- 12 *
- 13 *)
- 14
- 15
- 16 IMPORT ErrorManager;
- 17 IMPORT LowLevel;
- 18 IMPORT M2Strings;
- 19 IMPORT PosUtils;
- 20 IMPORT StrConv;
- 21 IMPORT StrEdit;
- 22 IMPORT SYSTEM;
- 23
- 24 VAR
- 25 Initialized : BOOLEAN;
- 26
- 27 PROCEDURE Init();
- 28 BEGIN
- 29 IF Initialized THEN
- 30 RETURN;
- 31 ELSE
- 32 Initialized := TRUE;
- 33 END;
- 34 ErrorManager.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 35 LowLevel.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 36 M2Strings.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 37 PosUtils.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 38 StrConv.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 39 StrEdit.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 40
- 41 DelimitingChars := ' ,()[].!?";';
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 42 EmbeddedStrMatters := TRUE;
- ***** ^ undeclared identifier
- 43 CaseSensitive := FALSE;
- ***** ^ undeclared identifier
- 44 END Init;
- ***** ^ not supported yet
- 45
- 46
- 47 CONST
- 48 null = '';
- 49 VAR
- 50 FatalError : BOOLEAN;
- 51
- 52 PROCEDURE SpotInside( TheSpot: CARDINAL;
- 53 TheStr: ARRAY OF CHAR ): BOOLEAN;
- ***** ^ not supported yet
- 54 BEGIN
- 55 IF FatalError THEN RETURN FALSE END;
- 56 IF TheSpot <= HIGH(TheStr) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 57 RETURN TRUE;
- 58 ELSE
- 59 RETURN FALSE;
- 60 END;
- 61 END SpotInside;
- ***** ^ not supported yet
- 62
- 63
- 64 PROCEDURE CharCount(TheChar : CHAR; VAR TheStr : ARRAY OF CHAR)
- ***** ^ not supported yet
- 65 : CARDINAL;
- 66 (*CharCount returns the number of TheChar's in TheStr. It is
- 67 used in StrLogic to detect possible omissions of brackets
- 68 and quotation marks, and should be deleted when a program
- 69 is complete.*)
- 70 BEGIN
- 71 RETURN PosUtils.ByteCount(M2Strings.Length(TheStr),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 72 TheChar,
- 73 SYSTEM.ADR(TheStr) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 74 END CharCount;
- ***** ^ not supported yet
- 75
- 76
- 77 PROCEDURE ExpressionTest(ObjectStr,
- 78 FormulaList: ARRAY OF CHAR): CARDINAL;
- ***** ^ not supported yet
- 79 CONST
- 80 ExpressionSeparator = '\';
- 81 blank = ' ';
- 82 OrSymbol = '|';
- 83 AndSymbol = '&';
- 84 NotSymbol = '~';
- 85 LftBracket = '[';
- 86 RtBracket = ']';
- 87 ExpansionChar = '*';
- 88 (*If FormulaList is more than zero bytes long, this routine
- 89 copies string-analysis expressions out of FormulaList one-by-
- 90 one. After it copies an expression it replaces the bytes it
- 91 formerly occupied in FormulaList with blanks. It keeps going
- 92 until FormulaList is all blank, or until one of the expressions
- 93 returns a TRUE. It returns the number of that expression, or
- 94 it returns 0 if none of the expressions are TRUE.*)
- 95
- 96 PROCEDURE ThisExpression(object,
- 97 formula : ARRAY OF CHAR) : BOOLEAN;
- ***** ^ not supported yet
- 98 (*ThisExpression is the routine that does the analysis of each
- 99 individual expression in the FormulaList.*)
- 100
- 101 TYPE
- 102 LogicSymbol = (NoSmblAtAll, OrSmbl, AndSmbl, NotSmbl,
- 103 lftbracket, rtbracket, ElementalStmt);
- 104 CONST
- 105 StackSize = 50;
- 106 TotalSmbls = 3;
- 107 VAR
- 108 OnePattern : ARRAY [0..40] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 109 SymbolCode : LogicSymbol;
- ***** ^ not supported yet
- 110 PrecedenceCount, OldFormulaPtr, OperatorStackPtr,
- 111 ElementStackPtr : CARDINAL;
- 112 ElementStack : ARRAY [1..StackSize] OF BOOLEAN;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 113 OperatorStack : ARRAY [0..StackSize] OF CARDINAL;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 114 (*Although it might look more elegant to make this an
- 115 array of LogicSymbol's, we can't do it because we need
- 116 to add numbers out of sequence to PrecedenceCount.*)
- 117
- 118 PROCEDURE ElementTest(VAR TheElement,
- 119 object : ARRAY OF CHAR) : BOOLEAN;
- ***** ^ not supported yet
- 120 (*ElementTest returns TRUE for the following statements about the
- 121 sentence "A red car just ran over your cat."
- 122 L < 60
- 123 [L means length in characters.]
- 124 L = 33
- 125 'red' < 5
- 126 "car" > 5
- 127 'car' = 7
- 128 'cat' > 'car'
- 129 W > 1
- 130 [W means words; represents number of DelimitingChars + 1]
- 131 W = 8
- 132 It returns FALSE for such statements as:
- 133 'dog' < 20
- 134 [In other words, the fact that Pos would return a 0 for the
- 135 string does not make the expression true. Both patterns in
- 136 an expression have to be there for it to be true.]
- 137 *)
- 138 TYPE
- 139 OperatorType = (NoOperator, EqualTo, UnequalTo, GreaterThan,
- 140 GreaterThanOrEqualTo, LessThan, LessThanOrEqualTo);
- 141
- 142 PROCEDURE GetOperator(VAR TheStr : ARRAY OF CHAR;
- ***** ^ not supported yet
- 143 VAR TheOperator : OperatorType;
- 144 VAR TheSpot : CARDINAL);
- 145 CONST
- 146 operators = '=#><';
- ***** ^ not supported yet
- 147 VAR
- 148 QuoteMark : CHAR;
- 149 (*Used to keep track of whether our quote mark is
- 150 single or double.*)
- 151 OpSpot, lngth, ndx : CARDINAL;
- 152 InString : BOOLEAN;
- 153 BEGIN
- 154 (*GetOperator*)
- 155 IF FatalError THEN RETURN END;
- 156 lngth := M2Strings.Length(TheStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 157 ndx := 0;
- 158 InString := FALSE;
- 159 QuoteMark := 0C;
- 160 TheSpot := 255;
- 161 TheOperator := NoOperator;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 162 OpSpot := 5;
- 163 (*OpSpot was uninitialized in Release 1.4; fixed in
- 164 Release 1.5 thanks to Mike Smyth.*)
- 165 WHILE (ndx<lngth) AND (TheOperator=NoOperator) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 166 IF (TheStr[ndx]='"') OR (TheStr[ndx]="'") THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 167 (*The stuff in this IF statement allows nesting a
- 168 single quote mark inside double quote marks, or
- 169 vice versa.*)
- 170 IF QuoteMark=0C THEN
- 171 QuoteMark := TheStr[ndx];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 172 END;
- 173 IF TheStr[ndx]=QuoteMark THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 174 InString := NOT InString;
- 175 END;
- 176 END;
- 177 IF NOT InString THEN
- 178 IF TheStr[ndx]=blank THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 179 M2Strings.Delete(TheStr, ndx, 1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 180 (*This strips all but the blanks in strings. I'm
- 181 not sure it's working; we seem to be doing some
- 182 redundant blank stripping, but things go
- 183 wrong if you try to strip blanks in only one
- 184 place.*)
- 185 END;
- 186 OpSpot := M2Strings.Pos( TheStr[ndx], operators );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 187 IF SpotInside( OpSpot, operators ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 188 TheSpot := ndx;
- 189 ELSE
- 190 TheSpot := 255;
- 191 (*Actually, we just want TheSpot to be some
- 192 number bigger than the HIGH of operators, but
- 193 Logitech won't let us get the HIGH of a constant.*)
- 194 END;
- 195 END;
- 196 IF SpotInside( OpSpot, operators ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 197 CASE TheStr[ndx] OF
- ***** ^ not supported yet
- ***** ^ not supported yet
- 198 '=' :
- 199 TheOperator := EqualTo;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 200 | '#' :
- 201 TheOperator := UnequalTo;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 202 | '>' :
- 203 TheOperator := GreaterThan;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 204 | '<' :
- 205 TheOperator := LessThan;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 206 ELSE
- 207 ErrorManager.WARN('TheSpot wrong in GetOperator.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 208 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 209 FatalError := TRUE;
- 210 RETURN;
- 211 END;
- 212 IF TheStr[ndx+1]='=' THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 213 INC(TheOperator);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 214 (*TheOperator should now be either
- 215 GreaterThanOrEqualTo or LessThanOrEqualTo.*)
- 216 END;
- 217 END;
- 218 INC(ndx);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 219 END;
- 220 IF TheOperator=NoOperator THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 221 TheSpot := lngth;
- 222 ELSIF TheSpot = 0 THEN
- 223 ErrorManager.WARN('Operator cannot begin an expression.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 224 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 225 FatalError := TRUE;
- 226 END;
- 227 END GetOperator;
- ***** ^ not supported yet
- 228
- 229 PROCEDURE PosOfOneTerm(ElementStr, ObjStr : ARRAY OF CHAR;
- ***** ^ not supported yet
- 230 spot1, spot2 : CARDINAL;
- 231 VAR missing : BOOLEAN) : CARDINAL;
- 232 VAR
- 233 lngth, tmp, ndx : CARDINAL;
- 234 TmpStr : ARRAY [0..80] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 235 BEGIN
- 236 (*PosOfOneTerm*)
- 237 IF FatalError THEN RETURN 0 END;
- 238 missing := FALSE;
- 239 M2Strings.Copy(ElementStr, spot1, spot2-spot1+1, TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 240 StrEdit.CutLeadingChars(blank, TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 241 IF (TmpStr[0]="'") OR (TmpStr[0]='"') THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 242 StrEdit.DeleteChar(TmpStr[0], TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 243 IF EmbeddedStrMatters THEN
- ***** ^ undeclared identifier
- 244 tmp := M2Strings.Pos(TmpStr,ObjStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 245 IF NOT SpotInside(tmp,ObjStr) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 246 missing := TRUE;
- 247 END;
- 248 RETURN tmp;
- 249 ELSE
- 250 tmp := PosUtils.PosDelimited(TmpStr,ObjStr,DelimitingChars);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 251 IF NOT SpotInside(tmp,ObjStr) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 252 missing := TRUE;
- 253 END;
- 254 RETURN tmp;
- 255 END;
- 256 ELSIF TmpStr[0]='L' THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 257 RETURN M2Strings.Length(ObjStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 258 ELSIF TmpStr[0]='W' THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 259 (*Count delimiters and return 0 or delimiters + 1.*)
- 260 lngth := M2Strings.Length(ObjStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 261 ndx := 0;
- 262 tmp := 0;
- 263 WHILE ndx<lngth DO
- 264 IF PosUtils.Present(ObjStr[ndx],DelimitingChars) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 265 INC(tmp);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 266 END;
- 267 INC(ndx);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 268 END;
- 269 IF (tmp>0) OR (lngth>0) THEN
- 270 INC(tmp);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 271 END;
- 272 RETURN tmp;
- 273 ELSIF ((TmpStr[0]>='0') AND (TmpStr[0]<='9')) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 274 IF StrConv.StrToCardinal(TmpStr,0,tmp) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 275 RETURN tmp;
- 276 ELSE
- 277 StrEdit.Append( TmpStr, '-- This did not convert correctly.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 278 ErrorManager.WARN(TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 279 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 280 FatalError := TRUE;
- 281 RETURN 0;
- 282 END;
- 283 ELSE
- 284 StrEdit.Append( TmpStr,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 285 ' -- Illegal term in this StrLogic formula.');
- ***** ^ not supported yet
- 286 ErrorManager.WARN(TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 287 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 288 FatalError := TRUE;
- 289 RETURN 0;
- 290 END;
- 291 END PosOfOneTerm;
- ***** ^ not supported yet
- 292 VAR
- 293 FirstTerm, SecondTerm, OperatorSpot : CARDINAL;
- 294 TermMissing : BOOLEAN;
- 295 TheOperator : OperatorType;
- ***** ^ not supported yet
- 296
- 297 BEGIN
- 298 (*ElementTest*)
- 299 IF FatalError THEN RETURN FALSE END;
- 300 GetOperator(TheElement, TheOperator, OperatorSpot);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 301 IF FatalError THEN RETURN FALSE END;
- 302 (*GetOperator cuts blanks, finds operaters if there are any,
- 303 indicates what they are in TheOperator, and indicates where
- 304 they are in OperatorSpot.*)
- 305 FirstTerm := PosOfOneTerm(TheElement,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 306 object,
- ***** ^ not supported yet
- 307 0,
- 308 OperatorSpot-1,
- 309 TermMissing);
- ***** ^ not supported yet
- 310 (*The terms we're talking about here can be simple strings
- 311 (e.g., 'red'), decimal numbers, or length ('L') or width
- 312 ('W') variables. PosOfOneTerm evaluates those things
- 313 and gives us back a numeric result based on them.*)
- 314 IF FatalError THEN RETURN FALSE END;
- 315 IF TermMissing THEN
- 316 RETURN FALSE;
- 317 END;
- 318 IF TheOperator#NoOperator THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 319 IF (TheOperator=GreaterThanOrEqualTo) OR (TheOperator=
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 320 LessThanOrEqualTo) THEN
- ***** ^ not supported yet
- 321 INC(OperatorSpot);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 322 (*We have to do this because those symbols are two
- 323 characters long, and we want OperatorSpot to
- 324 indicate the last character of the operator in the
- 325 next call to PosOfOneTerm.*)
- 326 END;
- 327 SecondTerm := PosOfOneTerm(TheElement,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 328 object,
- ***** ^ not supported yet
- 329 OperatorSpot+1,
- 330 M2Strings.Length(TheElement),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 331 TermMissing);
- ***** ^ not supported yet
- 332 IF FatalError THEN RETURN FALSE END;
- 333 IF TermMissing THEN
- 334 RETURN FALSE;
- 335 END;
- 336 END;
- 337 CASE TheOperator OF
- ***** ^ not supported yet
- 338 NoOperator :
- ***** ^ not supported yet
- 339 RETURN TRUE;
- 340 (*We know it's TRUE here because if the term had
- 341 been missing and there had been no operator, we
- 342 would have returned FALSE above in the IF TermMissing
- 343 statements.*)
- 344 | EqualTo :
- ***** ^ not supported yet
- 345 RETURN (FirstTerm=SecondTerm);
- 346 | UnequalTo :
- ***** ^ not supported yet
- 347 RETURN (FirstTerm#SecondTerm);
- 348 | GreaterThan :
- ***** ^ not supported yet
- 349 RETURN (FirstTerm>SecondTerm);
- 350 | GreaterThanOrEqualTo :
- ***** ^ not supported yet
- 351 RETURN (FirstTerm>=SecondTerm);
- 352 | LessThan :
- ***** ^ not supported yet
- 353 RETURN (FirstTerm<SecondTerm);
- 354 | LessThanOrEqualTo :
- ***** ^ not supported yet
- 355 RETURN (FirstTerm<=SecondTerm);
- 356 ELSE
- 357 ErrorManager.WARN('Weird operator in ElementTest.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 358 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 359 FatalError := TRUE;
- 360 RETURN FALSE;
- 361 END;
- 362 END ElementTest;
- ***** ^ not supported yet
- 363
- 364 PROCEDURE GetSymbolFromFormula(VAR TheElement : ARRAY OF CHAR;
- ***** ^ not supported yet
- 365 VAR TheOperator : LogicSymbol);
- 366 VAR
- 367 FormulaLength, FormulaPtr : CARDINAL;
- 368 InString, ElementFound : BOOLEAN;
- 369 QuoteMark: CHAR;
- 370 BEGIN
- 371 (*GetSymbolFromFormula*)
- 372 IF FatalError THEN RETURN END;
- 373 FormulaLength := M2Strings.Length(formula);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 374 QuoteMark := 0C;
- 375 StrEdit.AssignStr(null, TheElement);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 376 InString := FALSE;
- 377 TheOperator := NoSmblAtAll;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 378 ElementFound := FALSE;
- 379 IF (OldFormulaPtr+1) <= FormulaLength THEN
- 380 FormulaPtr := OldFormulaPtr;
- 381 (*OldFormulaPtr starts at 0, and subsequently points
- 382 at the first character of the next word or symbol needing
- 383 to be processed.*)
- 384 REPEAT
- 385 (*Look for next operator.*)
- 386 IF (NOT InString) THEN
- 387 WHILE formula[FormulaPtr]=blank DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 388 M2Strings.Delete(formula, FormulaPtr, 1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 389 END;
- 390 END;
- 391 IF (formula[FormulaPtr]='"')
- ***** ^ not supported yet
- ***** ^ not supported yet
- 392 OR (formula[FormulaPtr]="'") THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 393 IF QuoteMark = 0C THEN
- 394 QuoteMark := formula[FormulaPtr];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 395 END;
- 396 IF formula[FormulaPtr] = QuoteMark THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 397 InString := NOT InString;
- 398 IF NOT InString THEN
- 399 QuoteMark := 0C;
- 400 END;
- 401 END;
- 402 END;
- 403 IF NOT InString THEN
- 404 CASE formula[FormulaPtr] OF
- ***** ^ not supported yet
- ***** ^ not supported yet
- 405 OrSymbol :
- ***** ^ not supported yet
- 406 TheOperator := OrSmbl;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 407 | AndSymbol :
- ***** ^ not supported yet
- 408 TheOperator := AndSmbl;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 409 | NotSymbol :
- ***** ^ not supported yet
- 410 TheOperator := NotSmbl;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 411 | LftBracket :
- ***** ^ not supported yet
- 412 TheOperator := lftbracket;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 413 | RtBracket :
- ***** ^ not supported yet
- 414 TheOperator := rtbracket;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 415 ELSE
- 416 TheOperator := ElementalStmt;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 417 ElementFound := TRUE;
- 418 END;
- 419 ELSE
- 420 TheOperator := ElementalStmt;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 421 ElementFound := TRUE;
- 422 END;
- 423 WHILE InString DO
- 424 (*skip to the end of the string*)
- 425 INC(FormulaPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 426 IF formula[FormulaPtr] = QuoteMark THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 427 InString := NOT InString;
- 428 IF NOT InString THEN
- 429 QuoteMark := 0C;
- 430 END;
- 431 END;
- 432 END;
- 433 INC(FormulaPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 434 UNTIL (FormulaPtr >= FormulaLength)
- 435 OR (TheOperator#ElementalStmt);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 436 IF ElementFound THEN
- 437 IF TheOperator # ElementalStmt THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 438 DEC(FormulaPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 439 (*We DEC this because the INC at the
- 440 end of the loop makes it point to the character
- 441 AFTER the next one to be processed. FormulaPtr
- 442 is always supposed to be sitting on the next
- 443 character.*)
- 444 TheOperator := ElementalStmt;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 445 (*We set this back to ElementalStmt because the
- 446 process of searching for the end of the statement
- 447 messed up the value of TheOperator.*)
- 448 END;
- 449 M2Strings.Copy(formula, OldFormulaPtr,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 450 (FormulaPtr-OldFormulaPtr), TheElement);
- ***** ^ not supported yet
- 451 END;
- 452 OldFormulaPtr := FormulaPtr;
- 453 (*OldFormulaPtr gets updated in preparation for next call
- 454 to GetSymbolFromFormula.*)
- 455 END;
- 456 END GetSymbolFromFormula;
- ***** ^ not supported yet
- 457
- 458 PROCEDURE PrecedenceOf(logicsymbol : LogicSymbol) : CARDINAL;
- 459 BEGIN
- 460 IF FatalError THEN RETURN 0 END;
- 461 CASE logicsymbol OF
- ***** ^ not supported yet
- 462 NoSmblAtAll :
- ***** ^ not supported yet
- 463 RETURN (0);
- 464 | OrSmbl :
- ***** ^ not supported yet
- 465 RETURN (1);
- 466 | AndSmbl :
- ***** ^ not supported yet
- 467 RETURN (2);
- 468 | NotSmbl :
- ***** ^ not supported yet
- 469 RETURN (3);
- 470 | lftbracket :
- ***** ^ not supported yet
- 471 RETURN (4);
- 472 | rtbracket :
- ***** ^ not supported yet
- 473 RETURN (5);
- 474 ELSE
- 475 ErrorManager.WARN('PrecedenceOf got a weird LogicSymbol.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 476 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 477 FatalError := TRUE;
- 478 RETURN 0;
- 479 END;
- 480 END PrecedenceOf;
- ***** ^ not supported yet
- 481
- 482 PROCEDURE ResolveStacks();
- 483 VAR
- 484 Element : BOOLEAN;
- 485 BEGIN
- 486 (*ResolveStacks*)
- 487 IF FatalError THEN RETURN END;
- 488 WHILE (OperatorStackPtr>0) AND (OperatorStack[
- ***** ^ not supported yet
- 489 OperatorStackPtr]>=PrecedenceOf(SymbolCode)+
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 490 PrecedenceCount) DO
- 491 IF FatalError THEN RETURN END;
- 492 Element := ElementStack[ElementStackPtr];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 493 (*ElementStack is a stack of booleans.*)
- 494 CASE OperatorStack[OperatorStackPtr] MOD TotalSmbls OF
- ***** ^ not supported yet
- ***** ^ not supported yet
- 495 1 :
- 496 DEC(ElementStackPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 497 Element := Element OR ElementStack[ElementStackPtr];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 498 | 2 :
- 499 DEC(ElementStackPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 500 Element := Element AND ElementStack[ElementStackPtr];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 501 | 0, 3 :
- 502 Element := NOT Element;
- 503 ELSE
- 504 ErrorManager.WARN('Something strange in the OperatorStack.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 505 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 506 FatalError := TRUE;
- 507 RETURN;
- 508 END;
- 509 ElementStack[ElementStackPtr] := Element;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 510 DEC(OperatorStackPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 511 END;
- 512 END ResolveStacks;
- ***** ^ not supported yet
- 513
- 514 PROCEDURE AddToElementStack(TheElement : ARRAY OF CHAR);
- ***** ^ not supported yet
- 515 (*ElementStack is actually an array of booleans.
- 516 AddToElementStack puts a TRUE or a FALSE in the ElementStack,
- 517 depending on the presence or absence of TheElement in object.*)
- 518 VAR
- 519 tmp : BOOLEAN;
- 520 BEGIN
- 521 (*AddToElementStack*)
- 522 IF FatalError THEN RETURN END;
- 523 INC(ElementStackPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 524 IF ElementStackPtr>StackSize THEN
- 525 ErrorManager.WARN("Stack overflow in StrLogic.");
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 526 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 527 FatalError := TRUE;
- 528 RETURN;
- 529 END;
- 530 tmp := ElementTest(TheElement,object);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 531 IF FatalError THEN RETURN END;
- 532 ElementStack[ElementStackPtr] := tmp;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 533 END AddToElementStack;
- ***** ^ not supported yet
- 534
- 535 PROCEDURE AddToOperatorStack(symbol : LogicSymbol);
- 536 VAR
- 537 tmp : CARDINAL;
- 538 BEGIN
- 539 (*AddToOperatorStack*)
- 540 IF FatalError THEN RETURN END;
- 541 INC(OperatorStackPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 542 tmp := PrecedenceOf(symbol)+PrecedenceCount;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 543 IF FatalError THEN RETURN END;
- 544 OperatorStack[OperatorStackPtr] := tmp;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 545 END AddToOperatorStack;
- ***** ^ not supported yet
- 546
- 547 BEGIN
- 548 (*ThisExpression*)
- 549 IF FatalError THEN RETURN FALSE END;
- 550 StrEdit.CrunchBlanks(object);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 551 StrEdit.CrunchBlanks(formula);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 552 IF NOT CaseSensitive THEN
- ***** ^ undeclared identifier
- 553 StrEdit.CAPstr(object);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 554 StrEdit.CAPstr(formula);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 555 END;
- 556 OperatorStackPtr := 0;
- 557 OperatorStack[OperatorStackPtr] := 0;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 558 ElementStackPtr := 0;
- 559 PrecedenceCount := 0;
- 560 OldFormulaPtr := 0;
- 561 (*OldFormulaPtr should always point to
- 562 the first character of the next pattern
- 563 in the formula that needs to be processed.*)
- 564 GetSymbolFromFormula(OnePattern, SymbolCode);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 565 IF SymbolCode=NoSmblAtAll THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 566 RETURN FALSE;
- 567 ELSE
- 568 REPEAT
- 569 CASE SymbolCode OF
- ***** ^ not supported yet
- 570 ElementalStmt :
- ***** ^ not supported yet
- 571 AddToElementStack(OnePattern);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 572 IF FatalError THEN RETURN FALSE END;
- 573 | OrSmbl, AndSmbl, NotSmbl :
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 574 ResolveStacks();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 575 IF FatalError THEN RETURN FALSE END;
- 576 AddToOperatorStack(SymbolCode);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 577 | lftbracket :
- ***** ^ not supported yet
- 578 INC(PrecedenceCount, TotalSmbls);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 579 | rtbracket :
- ***** ^ not supported yet
- 580 DEC(PrecedenceCount, TotalSmbls);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 581 | NoSmblAtAll :
- ***** ^ not supported yet
- 582 ELSE
- 583 ErrorManager.WARN('SymbolCode probably not set.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 584 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 585 FatalError := TRUE;
- 586 RETURN FALSE;
- 587 END;
- 588 (*case*)
- 589 GetSymbolFromFormula(OnePattern, SymbolCode);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 590 UNTIL SymbolCode=NoSmblAtAll;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 591 ResolveStacks();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 592 IF FatalError THEN RETURN FALSE END;
- 593 IF ElementStackPtr<>1 THEN
- 594 ErrorManager.WARN('ThisExpression error.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 595 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 596 FatalError := TRUE;
- 597 RETURN FALSE;
- 598 END;
- 599 RETURN (ElementStack[1]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 600 END;
- 601 END ThisExpression;
- ***** ^ not supported yet
- 602 VAR
- 603 ExpressionIdentifier, EndOfIdentifier, StartOfExpr, EndOfExpr,
- 604 lngth, FormulaNumber : CARDINAL;
- 605 TempExpr : ARRAY [0..255] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 606 BEGIN
- 607 (*ExpressionTest*)
- 608 FatalError := FALSE;
- 609 StrLogicErrorLevel := 0;
- ***** ^ undeclared identifier
- 610 lngth := M2Strings.Length(FormulaList);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 611 IF lngth=0 THEN
- 612 RETURN 0;
- 613 END;
- 614 FormulaNumber := 1;
- 615 StrEdit.AssignStr(null, TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 616 REPEAT
- 617 StartOfExpr := CARDINAL(
- 618 LowLevel.ScanNE(lngth, blank, SYSTEM.ADR(FormulaList)));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 619 (*If there are no leading blanks, StartOfExpr will be 0.*)
- 620 IF FormulaList[StartOfExpr]=ExpressionSeparator THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 621 FormulaList[StartOfExpr] := blank;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 622 (*We have to do this to remove any leading backslash.
- 623 We do it in a loop to make sure that StartOfExpr gets
- 624 off on the right foot, but an incidental result is
- 625 that all leading null expressions will be ignored.*)
- 626 END;
- 627 UNTIL FormulaList[StartOfExpr]#blank;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 628 EndOfExpr := CARDINAL(LowLevel.ScanEQ(lngth,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 629 ExpressionSeparator,SYSTEM.ADR(FormulaList)));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 630 (*If there's no ExpressionSeparator, EndOfExpr will equal lngth.*)
- 631 WHILE (StartOfExpr+1)<lngth DO
- 632 (*It's StartOfExpr + 1 because StartOfExpr is always going
- 633 to represent the number of bytes you have to skip to get
- 634 from the first byte in FormulaList to the first byte of
- 635 the expression you're interested in.*)
- 636 LowLevel.Move(
- ***** ^ not supported yet
- ***** ^ not supported yet
- 637 LowLevel.AddAddr(SYSTEM.ADR(FormulaList), StartOfExpr),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 638 SYSTEM.ADR(TempExpr),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 639 EndOfExpr-StartOfExpr);
- ***** ^ not supported yet
- 640 StrEdit.SetLength(TempExpr, EndOfExpr-StartOfExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 641 IF ODD(CharCount("'",TempExpr)) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 642 (*This and the following three IF tests should be
- 643 deleted when your application is complete.*)
- 644 StrEdit.Append( TempExpr,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 645 '-- Single quotation marks may be unbalanced.');
- ***** ^ not supported yet
- 646 ErrorManager.WARN(TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 647 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 648 FatalError := TRUE;
- 649 RETURN 0;
- 650 END;
- 651 IF ODD(CharCount('"',TempExpr)) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 652 StrEdit.Append( TempExpr,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 653 '-- Double quotation marks may be unbalanced.');
- ***** ^ not supported yet
- 654 ErrorManager.WARN(TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 655 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 656 FatalError := TRUE;
- 657 RETURN 0;
- 658 END;
- 659 IF CharCount('[',TempExpr)#CharCount(']',TempExpr) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 660 StrEdit.Append( TempExpr, '-- Brackets may be unbalanced.' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 661 ErrorManager.WARN(TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 662 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 663 FatalError := TRUE;
- 664 RETURN 0;
- 665 END;
- 666 IF CharCount('(',TempExpr)#CharCount(')',TempExpr) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 667 StrEdit.Append( TempExpr,'-- Parentheses may be unbalanced.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 668 ErrorManager.WARN(TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 669 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 670 FatalError := TRUE;
- 671 RETURN 0;
- 672 END;
- 673 LowLevel.Fill(SYSTEM.ADR(FormulaList), EndOfExpr+1, blank);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 674 StrEdit.CutLeadingChars(blank, TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 675 IF M2Strings.Pos('(',TempExpr)=0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 676 (*The opening parenthesis immediately after the
- 677 ExpressionSeparator tells us that this expression
- 678 has an ExpressionIdentifier.*)
- 679 IF NOT StrConv.StrToCardinal(TempExpr,1,ExpressionIdentifier) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 680 StrEdit.Append( TempExpr,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 681 '-- Needs a number after the opening parenthesis.');
- ***** ^ not supported yet
- 682 ErrorManager.WARN(TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 683 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 684 FatalError := TRUE;
- 685 RETURN 0;
- 686 END;
- 687 IF ExpressionIdentifier=0 THEN
- 688 StrEdit.Append( TempExpr,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 689 " You can't use 0 as an ExpressionIdentifier.");
- ***** ^ not supported yet
- 690 ErrorManager.WARN(TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 691 INC(StrLogicErrorLevel);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 692 FatalError := TRUE;
- 693 RETURN 0;
- 694 END;
- 695 EndOfIdentifier := M2Strings.Pos(')',TempExpr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 696 M2Strings.Delete(TempExpr, 0, EndOfIdentifier + 1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 697 ELSE
- 698 ExpressionIdentifier := 0;
- 699 END;
- 700 IF ThisExpression(ObjectStr,TempExpr) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 701 IF FatalError THEN RETURN 0 END;
- 702 IF ExpressionIdentifier=0 THEN
- 703 RETURN FormulaNumber;
- 704 ELSE
- 705 RETURN ExpressionIdentifier;
- 706 END;
- 707 END;
- 708 StartOfExpr := CARDINAL(LowLevel.ScanNE(lngth,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 709 blank,
- 710 SYSTEM.ADR(FormulaList)));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 711 (*We look for the first nonblank because we wipe out previously
- 712 tested expressions with blanks.*)
- 713 EndOfExpr := CARDINAL(LowLevel.ScanEQ(lngth,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 714 ExpressionSeparator,SYSTEM.ADR(FormulaList)));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 715 INC(FormulaNumber);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 716 END;
- 717 RETURN 0;
- 718 END ExpressionTest;
- ***** ^ not supported yet
- 719
- 720 BEGIN
- 721 Initialized := FALSE;
- 722 Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 723 END StrLogic.
- ***** ^ not supported yet
- 559 errors
|