



InfixMatchPrule (lines 71-117)
Back to List
Browsing infix.h
0071 [ InfixMatchPrule PrintingRule range1 range2 wa wl t i i2 it2 itlc j k plus;
0072 itlc = infix_tolowercase;
0073 if (itlc->255 == 0) {
0074 for (j=0 : j<256 : j++) itlc->j = j;
0075 itlc->'A' = 'a'; itlc->'B' = 'b';
0076 itlc->'C' = 'c'; itlc->'D' = 'd';
0077 itlc->'E' = 'e'; itlc->'F' = 'f';
0078 itlc->'G' = 'g'; itlc->'H' = 'h';
0079 itlc->'I' = 'i'; itlc->'J' = 'j';
0080 itlc->'K' = 'k'; itlc->'L' = 'l';
0081 itlc->'M' = 'm'; itlc->'N' = 'n';
0082 itlc->'O' = 'o'; itlc->'P' = 'p';
0083 itlc->'Q' = 'q'; itlc->'R' = 'r';
0084 itlc->'S' = 's'; itlc->'T' = 't';
0085 itlc->'U' = 'u'; itlc->'V' = 'v';
0086 itlc->'W' = 'w'; itlc->'X' = 'x';
0087 itlc->'Y' = 'y'; itlc->'Z' = 'z';
0088 }
0089 switch(PrintingRule) {
0090 InfixPrintAttribute:
0091 if (wa->0 == '~') { wl--; wa++; plus = 100; } ! A tilde
0092 t = #attribute_names_array;
0093 InfixPrintProperty: t = #property_names_array;
0094 InfixPrintAction: t = #action_names_array;
0095 InfixPrintFakeAction: t = #fake_action_names_array;
0096 InfixPrintGlobal: t = #global_names_array;
0097 InfixPrintRoutine: t = #routine_names_array;
0098 InfixPrintAction: t = #constant_names_array;
0099 InfixPrintArray: t = #array_names_array;
0100 }
0101
0102 i2 = range2-range1; it2 = infix_text+2;
0103 for (i=0 : i<=i2 : i++) {
0104 infix_text-->0 = 62; @output_stream 3 infix_text;
0105 if (t) print (string) t-->i; else PrintingRule(i+range1);
0106 @output_stream -3;
0107 k = infix_text-->0;
0108 if (k ~= wl) jump XL;
0109 if (itlc->(it2->0) ~= wa->0) jump XL;
0110 for (j=1 : j<k : j++)
0111 if (itlc->(it2->j) ~= wa->j) jump XL;
0112 parsed_number = i + range1 + plus;
0113 rtrue;
0114 .XL;
0115 }
0116 rfalse;
0117 ];
Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.