Overview
Comment: | Add the "next" pattern operator. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
81587e71b1752bb2cbcc4f0690c89b1c |
User & Date: | user on 2021-04-18 22:54:09 |
Other Links: | manifest | tags |
Context
2021-04-19
| ||
21:12 | Display the PC character set in the internal test mode. check-in: 92d021271e user: user tags: trunk | |
2021-04-18
| ||
22:54 | Add the "next" pattern operator. check-in: 81587e71b1 user: user tags: trunk | |
22:44 | Implement pasting into text input prompts check-in: b43a526002 user: user tags: trunk | |
Changes
Modified class.c from [f6d1b8ebcb] to [bf6a8e2243].
︙ | ︙ | |||
985 986 987 988 989 990 991 | cl->codes[ptr++]=tokenv&15; } else if(Tokenf(TF_NAME)) { switch(tokenv) { case OP_ADD: case OP_CLIMB: case OP_EIGHT: case OP_FOUR: case OP_HEIGHT: case OP_LOC: case OP_MARK: case OP_SUB: case OP_DIR: case OP_DIR_C: case OP_DIR_E: case OP_DIR_EC: case OP_OBJTOPAT: case OP_OBJBOTTOMAT: case OP_CUT: case OP_MUL: | | | 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 | cl->codes[ptr++]=tokenv&15; } else if(Tokenf(TF_NAME)) { switch(tokenv) { case OP_ADD: case OP_CLIMB: case OP_EIGHT: case OP_FOUR: case OP_HEIGHT: case OP_LOC: case OP_MARK: case OP_SUB: case OP_DIR: case OP_DIR_C: case OP_DIR_E: case OP_DIR_EC: case OP_OBJTOPAT: case OP_OBJBOTTOMAT: case OP_CUT: case OP_MUL: case OP_OBJABOVE: case OP_OBJBELOW: case OP_TRACE: case OP_NEXT: case 0x0200 ... 0x02FF: // message case 0x4000 ... 0x7FFF: // class case 0xC000 ... 0xFFFF: // message cl->codes[ptr++]=tokenv; break; case OP_BEGIN: case OP_IF: if(depth==31) ParseError("Too much pattern nesting\n"); |
︙ | ︙ |
Modified class.doc from [5e94c88c88] to [045cee15e0].
︙ | ︙ | |||
2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 | (Height <number>) Fail the match if the height here isn't greater than this number. if Begin a block that can optionally match. ObjAbove Match the object above the currently matched object. ObjBelow Match the object below the currently matched object. ObjBottomAt | > > > | 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 | (Height <number>) Fail the match if the height here isn't greater than this number. if Begin a block that can optionally match. next Unconditionally fail the current attempt and try the next choice. ObjAbove Match the object above the currently matched object. ObjBelow Match the object below the currently matched object. ObjBottomAt |
︙ | ︙ |
Modified exec.c from [101251ce79] to [76a4545f4a].
︙ | ︙ | |||
1556 1557 1558 1559 1560 1561 1562 | n=VOIDLINK; x+=x_delta[code[ptr-1]]; y+=y_delta[code[ptr-1]]; if(x<1 || x>pfwidth || y<1 || y>pfheight) goto fail; break; case 8 ... 15: n=VOIDLINK; | | | | 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 | n=VOIDLINK; x+=x_delta[code[ptr-1]]; y+=y_delta[code[ptr-1]]; if(x<1 || x>pfwidth || y<1 || y>pfheight) goto fail; break; case 8 ... 15: n=VOIDLINK; x+=x_delta[(code[ptr-1]+d)&7]; y+=y_delta[(code[ptr-1]+d)&7]; if(x<1 || x>pfwidth || y<1 || y>pfheight) goto fail; break; case 0x0200 ... 0x02FF: g=code[ptr-1]&255; goto message; case 0x1000 ... 0x11FF: g=code[ptr-1]&255; |
︙ | ︙ | |||
1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 | Push(UVALUE(0,TY_MARK)); break; case OP_MUL: cp[cpi].x=x; cp[cpi].y=y; cp[cpi].dir=d; break; case OP_OBJABOVE: if(n==VOIDLINK) Throw("No object specified in pattern"); n=obj_above(n); break; case OP_OBJBELOW: if(n==VOIDLINK) Throw("No object specified in pattern"); n=obj_below(n); | > > | 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 | Push(UVALUE(0,TY_MARK)); break; case OP_MUL: cp[cpi].x=x; cp[cpi].y=y; cp[cpi].dir=d; break; case OP_NEXT: goto fail; case OP_OBJABOVE: if(n==VOIDLINK) Throw("No object specified in pattern"); n=obj_above(n); break; case OP_OBJBELOW: if(n==VOIDLINK) Throw("No object specified in pattern"); n=obj_below(n); |
︙ | ︙ |