Array InfixRV_rvals --> 32; Array InfixRV_lvals --> 32; Array InfixRV_op --> 32; Array InfixRV_lop --> 32; Array InfixRV_rop --> 32; Array InfixRV_types --> 32; Array InfixRV_commas --> 32; [ InfixRvalue acc w i n flag base expecting_term max maxi lop rop lvalside a b sysfun_f; if (InfixCheckLineSpaced()) return GPR_REPARSE; ! w = wn; for (i=0: i<10: i++) { wn = w; InfixRvalueTerm(); print i, "^"; } ! wn = w; expecting_term = true; base = 0; do { w = NextWordStopped(); if (expecting_term) { switch(w) { '-//': InfixRV_rvals-->n = 'unary-'; InfixRV_types-->n = base + 8; '[//': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 6; '[[': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 2; '++': InfixRV_rvals-->n = 'pre++'; InfixRV_types-->n = base + 9; '--': InfixRV_rvals-->n = 'pre--'; InfixRV_types-->n = base + 9; '(//': InfixRV_rvals-->n = w; InfixRV_types-->n = -3; base=base+100; ')//': InfixRV_rvals-->n = w; InfixRV_types-->n = -3; base=base-100; if (base < 0) { wn--; flag = true; } -1: flag = true; default: wn--; if (InfixRValueTerm() == 1) { InfixRV_rvals-->n = parsed_number; InfixRV_lvals-->n = infix_parsed_lvalue; InfixRV_types-->n = -1; expecting_term = false; } else flag = true; } } else { expecting_term = true; switch(w) { ',//': InfixRV_rvals-->n = w; InfixRV_types-->n = base; '=//': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 1; '&&', '||': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 2; '==', '[=', '>//', '>=', 'n = w; InfixRV_types-->n = base + 3; 'or': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 4; '+//', '-//': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 5; '*//', '@{2f}//', '%//', '&//', '|//': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 6; '->', '-->': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 7; ']&', ']#': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 10; './/': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 12; '::': InfixRV_rvals-->n = w; InfixRV_types-->n = base + 13; '(//': InfixRV_rvals-->n = '(rcall'; InfixRV_types-->n = base + 11; base = base + 100; ')//': InfixRV_rvals-->n = w; InfixRV_types-->n = -3; base = base - 100; if (base < 0) { wn--; flag = true; } expecting_term = false; '++': InfixRV_rvals-->n = 'post++'; InfixRV_types-->n = base + 9; expecting_term = false; '--': InfixRV_rvals-->n = 'post--'; InfixRV_types-->n = base + 9; expecting_term = false; default: flag = true; } } n++; } until (flag || n==32); if (base > 0) return -1; n--; if (n == 0) return -1; wn--; for (i=0: ii ~= -3) acc = InfixRV_rvals-->i; InfixRV_op-->i = acc; } for (::) { ! for (i=0: ii == -1) print InfixRV_rvals-->i, " "; ! else if (InfixRV_types-->i == -3) print " # "; ! else if (InfixRV_types-->i == -2) print " ## "; ! else print (address) InfixRV_rvals-->i, "_", InfixRV_types-->i, " "; ! } ! new_line; max = -2; for (i=0:ii > max) { max = InfixRV_types-->i; maxi = i; } if (max == -1) { parsed_number = InfixRV_rvals-->maxi; return 1; } lop = maxi-1; rop = maxi+1; while (lop>=0 && InfixRV_types-->lop < -1) lop--; while (roprop < -1) rop++; if (lop>=0) InfixRV_lop-->maxi = InfixRV_rvals-->lop; if (ropmaxi = InfixRV_rvals-->rop; flag = false; infix_term_type = INFIXTT_NUMBER; switch(InfixRV_rvals-->maxi) { ',//': acc = (InfixRV_rvals-->rop); '=//', 'pre++', 'post++', 'pre--', 'post--': lvalside = lop; switch(InfixRV_rvals-->maxi) { '=//': acc = (InfixRV_rvals-->rop); 'pre++': acc = (InfixRV_rvals-->rop) + 1; lvalside = rop; 'pre--': acc = (InfixRV_rvals-->rop) - 1; lvalside = rop; 'post++': acc = (InfixRV_rvals-->lop) + 1; 'post--': acc = (InfixRV_rvals-->lop) - 1; } switch (InfixRV_op-->lvalside) { './/': (InfixRV_lop-->lvalside).(InfixRV_rop-->lvalside) = acc; '->': (InfixRV_lop-->lvalside)->(InfixRV_rop-->lvalside) = acc; '-->': (InfixRV_lop-->lvalside)-->(InfixRV_rop-->lvalside) = acc; default: w = InfixRV_lvals-->lvalside; if (w == -1) return -1; @storew #globals_array w acc; } switch(InfixRV_rvals-->maxi) { 'post++': acc--; 'post--': acc++; } '(rcall': sysfun_f = false; switch (InfixRV_op-->lop) { './/': a = InfixRV_lop-->lop; b = InfixRV_rop-->lop; default: a = InfixRV_rvals-->lop; b = call; if (InfixRV_lvals-->lop == INFIXTT_SYSFUN) sysfun_f = true; } w = 0; i = maxi + 1; base = 100; if (InfixRV_types-->i == -1 && InfixRV_rvals-->i == ')//') { if (sysfun_f) return -1; acc = a.b(); } else { while (base > 0) { if (InfixRV_types-->i == -3 && InfixRV_rvals-->i == ')//') base = base - 100; if (InfixRV_types-->i == -3 && InfixRV_rvals-->i == '(//') base = base + 100; if (InfixRV_op-->i=='(rcall') base = base + 100; if (base == 100 && InfixRV_op-->i == ',//') { InfixRV_commas-->(w++) = i; ! print "Comma found at ", i, "^"; } i++; } ! print "Num args = ", w + 1, "^"; ! for (i = 0 : i < w : i++) ! print "arg: ", InfixRV_lop-->(InfixRV_commas-->i), "^"; ! print "arg: ", InfixRV_rvals-->rop, "^"; switch(w+1) { 1: if (sysfun_f) { b = InfixRV_rvals-->rop; infix_term_type = INFIXTT_NAMEDOBJECT; switch(a) { 'metaclass': acc = metaclass(b); 'parent': acc = parent(b); 'child': acc = child(b); 'children': acc = children(b); infix_term_type = INFIXTT_NUMBER; 'random': acc = random(b); infix_term_type = INFIXTT_NUMBER; 'sibling': acc = sibling(b); } } else acc = a.b(InfixRV_rvals-->rop); 2: if (sysfun_f) return -1; acc = a.b(InfixRV_lop-->(InfixRV_commas-->0), InfixRV_rvals-->rop); 3: if (sysfun_f) return -1; acc = a.b(InfixRV_lop-->(InfixRV_commas-->0), InfixRV_lop-->(InfixRV_commas-->1), InfixRV_rvals-->rop); 4: if (sysfun_f) return -1; acc = a.b(InfixRV_lop-->(InfixRV_commas-->0), InfixRV_lop-->(InfixRV_commas-->1), InfixRV_lop-->(InfixRV_commas-->2), InfixRV_rvals-->rop); 5: if (sysfun_f) return -1; acc = a.b(InfixRV_lop-->(InfixRV_commas-->0), InfixRV_lop-->(InfixRV_commas-->1), InfixRV_lop-->(InfixRV_commas-->2), InfixRV_lop-->(InfixRV_commas-->3), InfixRV_rvals-->rop); default: return -1; } } '+//': acc = (InfixRV_rvals-->lop) + (InfixRV_rvals-->rop); '-//': acc = (InfixRV_rvals-->lop) - (InfixRV_rvals-->rop); '*//': acc = (InfixRV_rvals-->lop) * (InfixRV_rvals-->rop); '@{2f}//': acc = (InfixRV_rvals-->lop) / (InfixRV_rvals-->rop); '%//': acc = (InfixRV_rvals-->lop) % (InfixRV_rvals-->rop); './/': acc = (InfixRV_rvals-->lop) . (InfixRV_rvals-->rop); '->': acc = (InfixRV_rvals-->lop) -> (InfixRV_rvals-->rop); '-->': acc = (InfixRV_rvals-->lop) --> (InfixRV_rvals-->rop); ']&': acc = (InfixRV_rvals-->lop) .& (InfixRV_rvals-->rop); ']#': acc = (InfixRV_rvals-->lop) .# (InfixRV_rvals-->rop); '::': acc = (InfixRV_rvals-->lop) :: (InfixRV_rvals-->rop); '&//': acc = (InfixRV_rvals-->lop) & (InfixRV_rvals-->rop); '|//': acc = (InfixRV_rvals-->lop) | (InfixRV_rvals-->rop); '&&': acc = (InfixRV_rvals-->lop) && (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; '||': acc = (InfixRV_rvals-->lop) || (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; 'lop) < (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; '<=': acc = (InfixRV_rvals-->lop) <= (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; '>//': acc = (InfixRV_rvals-->lop) > (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; '>=': acc = (InfixRV_rvals-->lop) >= (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; '==': acc = (InfixRV_rvals-->lop) == (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; '[=': acc = (InfixRV_rvals-->lop) ~= (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; 'has': acc = (InfixRV_rvals-->lop) has (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; 'hasnt': acc = (InfixRV_rvals-->lop) hasnt (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; 'in': acc = (InfixRV_rvals-->lop) in (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; 'notin': acc = (InfixRV_rvals-->lop) notin (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; 'provides': acc = (InfixRV_rvals-->lop) provides (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; 'ofclass': acc = (InfixRV_rvals-->lop) ofclass (InfixRV_rvals-->rop); infix_term_type = INFIXTT_LOGICAL; '[[': acc = ~~ (InfixRV_rvals-->rop); flag = true; '[//': acc = ~ (InfixRV_rvals-->rop); flag = true; 'unary-': acc = - (InfixRV_rvals-->rop); flag = true; } InfixRV_rvals-->maxi = acc; InfixRV_types-->maxi = -1; if (rop < n) InfixRV_types-->rop = -2; if (flag==false && lop >= 0) InfixRV_types-->lop = -2; } ];