|
|
1.1 ! root 1: /* Input/Output Statements */ ! 2: ! 3: io: io1 ! 4: { endio(); } ! 5: ; ! 6: ! 7: io1: iofmove ioctl ! 8: | iofmove unpar_fexpr ! 9: { ioclause(IOSUNIT, $2); endioctl(); } ! 10: | iofmove SSTAR ! 11: { ioclause(IOSUNIT, PNULL); endioctl(); } ! 12: | iofmove SPOWER ! 13: { ioclause(IOSUNIT, IOSTDERR); endioctl(); } ! 14: | iofctl ioctl ! 15: | read ioctl ! 16: { doio(PNULL); } ! 17: | read infmt ! 18: { doio(PNULL); } ! 19: | read ioctl inlist ! 20: { doio($3); } ! 21: | read infmt SCOMMA inlist ! 22: { doio($4); } ! 23: | read ioctl SCOMMA inlist ! 24: { doio($4); } ! 25: | write ioctl ! 26: { doio(PNULL); } ! 27: | write ioctl outlist ! 28: { doio($3); } ! 29: | print ! 30: { doio(PNULL); } ! 31: | print SCOMMA outlist ! 32: { doio($3); } ! 33: ; ! 34: ! 35: iofmove: fmkwd end_spec in_ioctl ! 36: ; ! 37: ! 38: fmkwd: SBACKSPACE ! 39: { iostmt = IOBACKSPACE; } ! 40: | SREWIND ! 41: { iostmt = IOREWIND; } ! 42: | SENDFILE ! 43: { iostmt = IOENDFILE; } ! 44: ; ! 45: ! 46: iofctl: ctlkwd end_spec in_ioctl ! 47: ; ! 48: ! 49: ctlkwd: SINQUIRE ! 50: { iostmt = IOINQUIRE; } ! 51: | SOPEN ! 52: { iostmt = IOOPEN; } ! 53: | SCLOSE ! 54: { iostmt = IOCLOSE; } ! 55: ; ! 56: ! 57: infmt: unpar_fexpr ! 58: { ! 59: ioclause(IOSUNIT, PNULL); ! 60: ioclause(IOSFMT, $1); ! 61: endioctl(); ! 62: } ! 63: | SSTAR ! 64: { ! 65: ioclause(IOSUNIT, PNULL); ! 66: ioclause(IOSFMT, PNULL); ! 67: endioctl(); ! 68: } ! 69: ; ! 70: ! 71: ioctl: SLPAR fexpr SRPAR ! 72: { ! 73: ioclause(IOSUNIT, $2); ! 74: endioctl(); ! 75: } ! 76: | SLPAR ctllist SRPAR ! 77: { endioctl(); } ! 78: ; ! 79: ! 80: ctllist: ioclause ! 81: | ctllist SCOMMA ioclause ! 82: ; ! 83: ! 84: ioclause: fexpr ! 85: { ioclause(IOSPOSITIONAL, $1); } ! 86: | SSTAR ! 87: { ioclause(IOSPOSITIONAL, PNULL); } ! 88: | SPOWER ! 89: { ioclause(IOSPOSITIONAL, IOSTDERR); } ! 90: | nameeq expr ! 91: { ioclause($1, $2); } ! 92: | nameeq SSTAR ! 93: { ioclause($1, PNULL); } ! 94: | nameeq SPOWER ! 95: { ioclause($1, IOSTDERR); } ! 96: ; ! 97: ! 98: nameeq: SNAMEEQ ! 99: { $$ = iocname(); } ! 100: ; ! 101: ! 102: read: SREAD end_spec in_ioctl ! 103: { iostmt = IOREAD; } ! 104: ; ! 105: ! 106: write: SWRITE end_spec in_ioctl ! 107: { iostmt = IOWRITE; } ! 108: ; ! 109: ! 110: print: SPRINT end_spec fexpr in_ioctl ! 111: { ! 112: iostmt = IOWRITE; ! 113: ioclause(IOSUNIT, PNULL); ! 114: ioclause(IOSFMT, $3); ! 115: endioctl(); ! 116: } ! 117: | SPRINT end_spec SSTAR in_ioctl ! 118: { ! 119: iostmt = IOWRITE; ! 120: ioclause(IOSUNIT, PNULL); ! 121: ioclause(IOSFMT, PNULL); ! 122: endioctl(); ! 123: } ! 124: ; ! 125: ! 126: inlist: inelt ! 127: { $$ = mkchain($1, CHNULL); } ! 128: | inlist SCOMMA inelt ! 129: { $$ = hookup($1, mkchain($3, CHNULL)); } ! 130: ; ! 131: ! 132: inelt: lhs ! 133: { $$ = (tagptr) $1; } ! 134: | SLPAR inlist SCOMMA dospec SRPAR ! 135: { $$ = (tagptr) mkiodo($4,$2); } ! 136: ; ! 137: ! 138: outlist: uexpr ! 139: { $$ = mkchain($1, CHNULL); } ! 140: | other ! 141: { $$ = mkchain($1, CHNULL); } ! 142: | out2 ! 143: ; ! 144: ! 145: out2: uexpr SCOMMA uexpr ! 146: { $$ = mkchain($1, mkchain($3, CHNULL) ); } ! 147: | uexpr SCOMMA other ! 148: { $$ = mkchain($1, mkchain($3, CHNULL) ); } ! 149: | other SCOMMA uexpr ! 150: { $$ = mkchain($1, mkchain($3, CHNULL) ); } ! 151: | other SCOMMA other ! 152: { $$ = mkchain($1, mkchain($3, CHNULL) ); } ! 153: | out2 SCOMMA uexpr ! 154: { $$ = hookup($1, mkchain($3, CHNULL) ); } ! 155: | out2 SCOMMA other ! 156: { $$ = hookup($1, mkchain($3, CHNULL) ); } ! 157: ; ! 158: ! 159: other: complex_const ! 160: { $$ = (tagptr) $1; } ! 161: | SLPAR uexpr SCOMMA dospec SRPAR ! 162: { $$ = (tagptr) mkiodo($4, mkchain($2, CHNULL) ); } ! 163: | SLPAR other SCOMMA dospec SRPAR ! 164: { $$ = (tagptr) mkiodo($4, mkchain($2, CHNULL) ); } ! 165: | SLPAR out2 SCOMMA dospec SRPAR ! 166: { $$ = (tagptr) mkiodo($4, $2); } ! 167: ; ! 168: ! 169: in_ioctl: ! 170: { startioctl(); } ! 171: ;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.