Commit | Line | Data |
a687059c |
1 | /* $Header: spat.h,v 3.0 89/10/18 15:23:14 lwall Locked $ |
2 | * |
3 | * Copyright (c) 1989, Larry Wall |
4 | * |
5 | * You may distribute under the terms of the GNU General Public License |
6 | * as specified in the README file that comes with the perl 3.0 kit. |
8d063cd8 |
7 | * |
8 | * $Log: spat.h,v $ |
a687059c |
9 | * Revision 3.0 89/10/18 15:23:14 lwall |
10 | * 3.0 baseline |
8d063cd8 |
11 | * |
12 | */ |
13 | |
14 | struct scanpat { |
15 | SPAT *spat_next; /* list of all scanpats */ |
378cc40b |
16 | REGEXP *spat_regexp; /* compiled expression */ |
8d063cd8 |
17 | ARG *spat_repl; /* replacement string for subst */ |
18 | ARG *spat_runtime; /* compile pattern at runtime */ |
378cc40b |
19 | STR *spat_short; /* for a fast bypass of execute() */ |
8d063cd8 |
20 | bool spat_flags; |
378cc40b |
21 | char spat_slen; |
8d063cd8 |
22 | }; |
23 | |
24 | #define SPAT_USED 1 /* spat has been used once already */ |
a687059c |
25 | #define SPAT_ONCE 2 /* use pattern only once per reset */ |
8d063cd8 |
26 | #define SPAT_SCANFIRST 4 /* initial constant not anchored */ |
378cc40b |
27 | #define SPAT_ALL 8 /* initial constant is whole pat */ |
2e1b3b7e |
28 | #define SPAT_SKIPWHITE 16 /* skip leading whitespace for split */ |
378cc40b |
29 | #define SPAT_FOLD 32 /* case insensitivity */ |
a687059c |
30 | #define SPAT_CONST 64 /* subst replacement is constant */ |
31 | #define SPAT_KEEP 128 /* keep 1st runtime pattern forever */ |
8d063cd8 |
32 | |
8d063cd8 |
33 | EXT SPAT *curspat; /* what to do \ interps from */ |
378cc40b |
34 | EXT SPAT *lastspat; /* what to use in place of null pattern */ |
35 | |
36 | EXT char *hint INIT(Nullch); /* hint from cmd_exec to do_match et al */ |
8d063cd8 |
37 | |
38 | #define Nullspat Null(SPAT*) |