1: #
   2: /*
   3:  * pxp - Pascal execution profiler
   4:  *
   5:  * Bill Joy UCB
   6:  * Version 1.2 January 1979
   7:  */
   8: 
   9: #include "0.h"
  10: #include "tree.h"
  11: 
  12: /*
  13:  * A "variable"
  14:  */
  15: lvalue(r)
  16:     register int *r;
  17: {
  18:     register *c, *co;
  19: 
  20:     ppid(r[2]);
  21:     for (c = r[3]; c != NIL; c = c[2]) {
  22:         co = c[1];
  23:         if (co == NIL)
  24:             continue;
  25:         switch (co[0]) {
  26:             case T_PTR:
  27:                 ppop("^");
  28:                 continue;
  29:             case T_ARY:
  30:                 arycod(co[1]);
  31:                 continue;
  32:             case T_FIELD:
  33:                 ppop(".");
  34:                 ppid(co[1]);
  35:                 continue;
  36:             case T_ARGL:
  37:                 ppid("{unexpected argument list}");
  38:                 break;
  39:             default:
  40:                 panic("lval2");
  41:         }
  42:     }
  43: }
  44: 
  45: /*
  46:  * Subscripting
  47:  */
  48: arycod(el)
  49:     register int *el;
  50: {
  51: 
  52:     ppbra("[");
  53:     if (el != NIL)
  54:         for (;;) {
  55:             rvalue(el[1], NIL);
  56:             el = el[2];
  57:             if (el == NIL)
  58:                 break;
  59:             ppsep(", ");
  60:         }
  61:     else
  62:         rvalue(NIL, NIL);
  63:     ppket("]");
  64: }

Defined functions

arycod defined in line 48; used 1 times
  • in line 30
lvalue defined in line 15; used 3 times
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2016
Valid CSS Valid XHTML 1.0 Strict