Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs
schrx.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  regexp
struct  Regwork

Defines

#define REGEXP_IS_UTF8   0x01
#define REGEXP_IS_PCRE   0x02
#define REGEXP_ANCH   0x04
#define REGEXP_MUST_CI   0x08
#define REGEXP_JIT   0x10
#define N_ITO_DELTA(prog, extra, re)   ((prog+extra) - re)
#define N_ITO_SPACE(v)   v
#define ITO(x, y)   y
#define MAGIC   156
#define END   0 /* no End of program. */
#define BOI   1 /* no Match "" at beginning of input. */
#define EOI   2 /* no Match "" at end of input. */
#define ANY   3 /* no Match any one character. */
#define ANYL   4 /* no Anything but a linefeed */
#define ANYOF   5 /* bitmap Match any character in the bitmap. */
#define EXACTLY1   6 /* byte Match the character. */
#define RANGE   7 /* byte,byte Match any character in this range. */
#define NOTRANGE   8 /* byte,byte Match any character not in this range. */
#define BRANCH   9 /* node Match this alternative, or the next... */
#define BACK   10 /* no Match "", "next" ptr points backward. */
#define EXACTLY   11 /* str Match this string. */
#define EXACTLY_CI   12 /* str Match this string. */
#define NOTHING   13 /* no Match empty string. */
#define STAR   14 /* node Match this (simple) thing 0 or more times. */
#define PLUS   15 /* node Match this (simple) thing 1 or more times. */
#define STAR2   16 /* non-greedy star. */
#define PLUS2   17 /* non-greedy plus. */
#define STAR3   18 /* 2 nos Like STAR, but with numeric quantifiers */
#define STAR4   19 /* 2 nos non-greedy STAR3 */
#define OPENN   20 /* like OPEN, but with an n >= 50, or n == 0 means (?:...) */
#define CLOSEN   21 /* like CLOSE, but with an n >= 50 */
#define LOOKT   22 /* (?=...) or (?<=...)*/
#define LOOKF   23 /* (?!...) or (?<!...) */
#define LOOKTX   24 /* (?>...) */
#define LOOKBT   25 /* (?<=...)*/
#define LOOKBF   26 /* (?<!...) */
#define LOOKE   27 /* ender for LOOK* */
#define BACKREF   28 /* <n>, to match exactly the result for cluster <n> */
#define BACKREF_CI   29 /* case-insensitive version */
#define COUNTINIT   30
#define COUNTOVER   31
#define COUNTUNDER   32
#define COUNTBACK   33
#define COUNTBACKFAIL   34
#define SAVECONST   35 /* no no Save position and count */
#define MAYBECONST   36 /* no no Save position and count */
#define WORDBOUND   37
#define NOTWORDBOUND   38
#define BOL   39 /* no Match "" at beginning of line. */
#define EOL   40 /* no Match "" at end of line. */
#define UNIPROP   41
#define CONDITIONAL   42
#define EXACTLY2   43 /* byte,byte Match either byte (useful for some CI cases) */
#define OPEN   44 /* no Mark this point in input as start of #n. */
#define CLOSE   78 /* no Analogous to OPEN. */
#define OPSTR(o)   (o + 2)
#define OPSTRx(o)   (o + 1)
#define OPLEN(o, regstr)   ((int)(((unsigned char *)regstr)[o] << 8) | (((unsigned char *)regstr)[o+1]))
#define OPRNGS(o, regstr)   ((int)(((unsigned char *)regstr)[o]))
#define OP(p, regstr)   (regstr[p])
#define NEXT(p, regstr)   (((((unsigned char *)regstr)[(p)+1]&255)<<8) + (((unsigned char *)regstr)[(p)+2]&255))
#define OPERAND(p)   ((p) + 3)
#define OPERAND2(p)   ((p) + 5)
#define OPERAND3(p)   ((p) + 7)
#define OPERAND4(p)   ((p) + 9)
#define UCHAR(v)   ((unsigned char)(v))
#define ISMULT(c, parse_flags)   ((c) == '*' || (c) == '+' || (c) == '?' || ((parse_flags & PARSE_PCRE) && ((c) == '{')))
#define META   "^$.[()|?+*\\"
#define PCRE_META   "^$.[()|?+*\\{}]"
#define HASWIDTH   0x01 /* Known never to match null string. */
#define SIMPLE   0x02 /* Simple enough to be STAR/PLUS operand. */
#define SPSTART   0x04 /* Starts with * or +. */
#define SPFIXED   0x08 /* Always matches a particular length */
#define NEEDSAVECONST   0x10 /* Fixed-size thing inside (), lift out save in case of repeat. */
#define SPNOTHING   0x20 /* Unconditionally matches nothing. */
#define WORST   0 /* Worst case. */
#define PARSE_CASE_SENS   0x1
#define PARSE_PCRE   0x2
#define PARSE_SINGLE_LINE   0x4
#define rx_tolower(c)   (((c >= 'A') && (c <= 'Z')) ? (c + ('a' - 'A')) : c)
#define rx_toupper(c)   (((c >= 'a') && (c <= 'z')) ? (c - ('a' - 'A')) : c)
#define rx_isword(c)   (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || ((c >= '0') && (c <= '9')) || (c == '_'))

Typedefs

typedef long rxpos
typedef int(* Scheme_Regexp_Matcher )(struct Regwork *rw)
typedef struct regexp regexp
typedef struct Regwork Regwork

Class Documentation

struct regexp

Definition at line 14 of file schrx.h.

Collaboration diagram for regexp:
Class Members
short flags
long maxlookback
long ncounter
long nsubexp
char program
long regmlen
long regmust
long regsize
unsigned char * regstart
MZ_HASH_KEY_EX Scheme_Object * source
Scheme_Type type
struct Regwork

Definition at line 216 of file schrx.h.

Collaboration diagram for Regwork:
Class Members
short aborted
rxpos boi
rxpos bol
int * counters
rxpos * endp
rxpos input
rxpos input_end
rxpos input_maxend
rxpos input_start
char * instr
rxpos instr_size
rxpos * maybep
short nonblock
Scheme_Object * peekskip
Scheme_Object * port
rxpos * startp
MZTAG_IF_REQUIRED char * str
Scheme_Object * unless_evt

Define Documentation

#define ANY   3 /* no Match any one character. */

Definition at line 90 of file schrx.h.

#define ANYL   4 /* no Anything but a linefeed */

Definition at line 91 of file schrx.h.

#define ANYOF   5 /* bitmap Match any character in the bitmap. */

Definition at line 92 of file schrx.h.

#define BACK   10 /* no Match "", "next" ptr points backward. */

Definition at line 97 of file schrx.h.

#define BACKREF   28 /* <n>, to match exactly the result for cluster <n> */

Definition at line 115 of file schrx.h.

#define BACKREF_CI   29 /* case-insensitive version */

Definition at line 116 of file schrx.h.

#define BOI   1 /* no Match "" at beginning of input. */

Definition at line 88 of file schrx.h.

#define BOL   39 /* no Match "" at beginning of line. */

Definition at line 126 of file schrx.h.

#define BRANCH   9 /* node Match this alternative, or the next... */

Definition at line 96 of file schrx.h.

#define CLOSE   78 /* no Analogous to OPEN. */

Definition at line 133 of file schrx.h.

#define CLOSEN   21 /* like CLOSE, but with an n >= 50 */

Definition at line 108 of file schrx.h.

#define CONDITIONAL   42

Definition at line 129 of file schrx.h.

#define COUNTBACK   33

Definition at line 120 of file schrx.h.

#define COUNTBACKFAIL   34

Definition at line 121 of file schrx.h.

#define COUNTINIT   30

Definition at line 117 of file schrx.h.

#define COUNTOVER   31

Definition at line 118 of file schrx.h.

#define COUNTUNDER   32

Definition at line 119 of file schrx.h.

#define END   0 /* no End of program. */

Definition at line 87 of file schrx.h.

#define EOI   2 /* no Match "" at end of input. */

Definition at line 89 of file schrx.h.

#define EOL   40 /* no Match "" at end of line. */

Definition at line 127 of file schrx.h.

#define EXACTLY   11 /* str Match this string. */

Definition at line 98 of file schrx.h.

#define EXACTLY1   6 /* byte Match the character. */

Definition at line 93 of file schrx.h.

#define EXACTLY2   43 /* byte,byte Match either byte (useful for some CI cases) */

Definition at line 130 of file schrx.h.

#define EXACTLY_CI   12 /* str Match this string. */

Definition at line 99 of file schrx.h.

#define HASWIDTH   0x01 /* Known never to match null string. */

Definition at line 196 of file schrx.h.

#define ISMULT (   c,
  parse_flags 
)    ((c) == '*' || (c) == '+' || (c) == '?' || ((parse_flags & PARSE_PCRE) && ((c) == '{')))

Definition at line 189 of file schrx.h.

#define ITO (   x,
  y 
)    y

Definition at line 44 of file schrx.h.

#define LOOKBF   26 /* (?<!...) */

Definition at line 113 of file schrx.h.

#define LOOKBT   25 /* (?<=...)*/

Definition at line 112 of file schrx.h.

#define LOOKE   27 /* ender for LOOK* */

Definition at line 114 of file schrx.h.

#define LOOKF   23 /* (?!...) or (?<!...) */

Definition at line 110 of file schrx.h.

#define LOOKT   22 /* (?=...) or (?<=...)*/

Definition at line 109 of file schrx.h.

#define LOOKTX   24 /* (?>...) */

Definition at line 111 of file schrx.h.

#define MAGIC   156

Definition at line 48 of file schrx.h.

#define MAYBECONST   36 /* no no Save position and count */

Definition at line 123 of file schrx.h.

#define META   "^$.[()|?+*\\"

Definition at line 190 of file schrx.h.

#define N_ITO_DELTA (   prog,
  extra,
  re 
)    ((prog+extra) - re)

Definition at line 42 of file schrx.h.

#define N_ITO_SPACE (   v)    v

Definition at line 43 of file schrx.h.

#define NEEDSAVECONST   0x10 /* Fixed-size thing inside (), lift out save in case of repeat. */

Definition at line 200 of file schrx.h.

#define NEXT (   p,
  regstr 
)    (((((unsigned char *)regstr)[(p)+1]&255)<<8) + (((unsigned char *)regstr)[(p)+2]&255))

Definition at line 173 of file schrx.h.

#define NOTHING   13 /* no Match empty string. */

Definition at line 100 of file schrx.h.

#define NOTRANGE   8 /* byte,byte Match any character not in this range. */

Definition at line 95 of file schrx.h.

#define NOTWORDBOUND   38

Definition at line 125 of file schrx.h.

#define OP (   p,
  regstr 
)    (regstr[p])

Definition at line 172 of file schrx.h.

#define OPEN   44 /* no Mark this point in input as start of #n. */

Definition at line 131 of file schrx.h.

#define OPENN   20 /* like OPEN, but with an n >= 50, or n == 0 means (?:...) */

Definition at line 107 of file schrx.h.

#define OPERAND (   p)    ((p) + 3)

Definition at line 174 of file schrx.h.

#define OPERAND2 (   p)    ((p) + 5)

Definition at line 175 of file schrx.h.

#define OPERAND3 (   p)    ((p) + 7)

Definition at line 176 of file schrx.h.

#define OPERAND4 (   p)    ((p) + 9)

Definition at line 177 of file schrx.h.

#define OPLEN (   o,
  regstr 
)    ((int)(((unsigned char *)regstr)[o] << 8) | (((unsigned char *)regstr)[o+1]))

Definition at line 137 of file schrx.h.

#define OPRNGS (   o,
  regstr 
)    ((int)(((unsigned char *)regstr)[o]))

Definition at line 138 of file schrx.h.

#define OPSTR (   o)    (o + 2)

Definition at line 135 of file schrx.h.

#define OPSTRx (   o)    (o + 1)

Definition at line 136 of file schrx.h.

#define PARSE_CASE_SENS   0x1

Definition at line 205 of file schrx.h.

#define PARSE_PCRE   0x2

Definition at line 206 of file schrx.h.

#define PARSE_SINGLE_LINE   0x4

Definition at line 207 of file schrx.h.

#define PCRE_META   "^$.[()|?+*\\{}]"

Definition at line 191 of file schrx.h.

#define PLUS   15 /* node Match this (simple) thing 1 or more times. */

Definition at line 102 of file schrx.h.

#define PLUS2   17 /* non-greedy plus. */

Definition at line 104 of file schrx.h.

#define RANGE   7 /* byte,byte Match any character in this range. */

Definition at line 94 of file schrx.h.

#define REGEXP_ANCH   0x04

Definition at line 33 of file schrx.h.

#define REGEXP_IS_PCRE   0x02

Definition at line 32 of file schrx.h.

#define REGEXP_IS_UTF8   0x01

Definition at line 31 of file schrx.h.

#define REGEXP_JIT   0x10

Definition at line 35 of file schrx.h.

#define REGEXP_MUST_CI   0x08

Definition at line 34 of file schrx.h.

#define rx_isword (   c)    (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || ((c >= '0') && (c <= '9')) || (c == '_'))

Definition at line 211 of file schrx.h.

#define rx_tolower (   c)    (((c >= 'A') && (c <= 'Z')) ? (c + ('a' - 'A')) : c)

Definition at line 209 of file schrx.h.

#define rx_toupper (   c)    (((c >= 'a') && (c <= 'z')) ? (c - ('a' - 'A')) : c)

Definition at line 210 of file schrx.h.

#define SAVECONST   35 /* no no Save position and count */

Definition at line 122 of file schrx.h.

#define SIMPLE   0x02 /* Simple enough to be STAR/PLUS operand. */

Definition at line 197 of file schrx.h.

#define SPFIXED   0x08 /* Always matches a particular length */

Definition at line 199 of file schrx.h.

#define SPNOTHING   0x20 /* Unconditionally matches nothing. */

Definition at line 201 of file schrx.h.

#define SPSTART   0x04 /* Starts with * or +. */

Definition at line 198 of file schrx.h.

#define STAR   14 /* node Match this (simple) thing 0 or more times. */

Definition at line 101 of file schrx.h.

#define STAR2   16 /* non-greedy star. */

Definition at line 103 of file schrx.h.

#define STAR3   18 /* 2 nos Like STAR, but with numeric quantifiers */

Definition at line 105 of file schrx.h.

#define STAR4   19 /* 2 nos non-greedy STAR3 */

Definition at line 106 of file schrx.h.

#define UCHAR (   v)    ((unsigned char)(v))

Definition at line 187 of file schrx.h.

#define UNIPROP   41

Definition at line 128 of file schrx.h.

#define WORDBOUND   37

Definition at line 124 of file schrx.h.

#define WORST   0 /* Worst case. */

Definition at line 202 of file schrx.h.


Typedef Documentation

typedef struct regexp regexp
typedef long rxpos

Definition at line 8 of file schrx.h.

Definition at line 12 of file schrx.h.