Rizin
unix-like reverse engineering framework and cli tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Friends Macros Modules Pages
regex2.h File Reference

Go to the source code of this file.

Classes

struct  cset
 
struct  re_guts
 

Macros

#define MAGIC1   ((('r' ^ 0200) << 8) | 'e')
 
#define OPRMASK   0xf8000000LU
 
#define OPDMASK   0x07ffffffLU
 
#define OPSHIFT   ((unsigned)27)
 
#define OP(n)   ((n)&OPRMASK)
 
#define OPND(n)   ((n)&OPDMASK)
 
#define SOP(op, opnd)   ((op) | (opnd))
 
#define OEND   (1LU << OPSHIFT) /* endmarker - */
 
#define OCHAR   (2LU << OPSHIFT) /* character unsigned char */
 
#define OBOL   (3LU << OPSHIFT) /* left anchor - */
 
#define OEOL   (4LU << OPSHIFT) /* right anchor - */
 
#define OANY   (5LU << OPSHIFT) /* . - */
 
#define OANYOF   (6LU << OPSHIFT) /* [...] set number */
 
#define OBACK_   (7LU << OPSHIFT) /* begin \d paren number */
 
#define O_BACK   (8LU << OPSHIFT) /* end \d paren number */
 
#define OPLUS_   (9LU << OPSHIFT) /* + prefix fwd to suffix */
 
#define O_PLUS   (10LU << OPSHIFT) /* + suffix back to prefix */
 
#define OQUEST_   (11LU << OPSHIFT) /* ? prefix fwd to suffix */
 
#define O_QUEST   (12LU << OPSHIFT) /* ? suffix back to prefix */
 
#define OLPAREN   (13LU << OPSHIFT) /* ( fwd to ) */
 
#define ORPAREN   (14LU << OPSHIFT) /* ) back to ( */
 
#define OCH_   (15LU << OPSHIFT) /* begin choice fwd to OOR2 */
 
#define OOR1   (16LU << OPSHIFT) /* | pt. 1 back to OOR1 or OCH_ */
 
#define OOR2   (17LU << OPSHIFT) /* | pt. 2 fwd to OOR2 or O_CH */
 
#define O_CH   (18LU << OPSHIFT) /* end choice back to OOR1 */
 
#define OBOW   (19LU << OPSHIFT) /* begin word - */
 
#define OEOW   (20LU << OPSHIFT) /* end word - */
 
#define CHadd(cs, c)   ((cs)->ptr[(ut8)(c)] |= (cs)->mask, (cs)->hash += (c))
 
#define CHsub(cs, c)   ((cs)->ptr[(ut8)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
 
#define CHIN(cs, c)   ((cs)->ptr[(ut8)(c)] & (cs)->mask)
 
#define MCadd(p, cs, cp)   mcadd(p, cs, cp) /* regcomp() internal fns */
 
#define MCsub(p, cs, cp)   mcsub(p, cs, cp)
 
#define MCin(p, cs, cp)   mcin(p, cs, cp)
 
#define MAGIC2   ((('R' ^ 0200) << 8) | 'E')
 
#define USEBOL   01 /* used ^ */
 
#define USEEOL   02 /* used $ */
 
#define BAD   04 /* something wrong */
 
#define OUT   (-CHAR_MIN + CHAR_MAX + 1) /* a non-character value */
 
#define ISWORD(c)   (isalnum((ut8)(c)) || (c) == '_')
 

Typedefs

typedef unsigned long sop
 
typedef long sopno
 
typedef unsigned char cat_t
 

Macro Definition Documentation

◆ BAD

#define BAD   04 /* something wrong */

Definition at line 141 of file regex2.h.

◆ CHadd

#define CHadd (   cs,
  c 
)    ((cs)->ptr[(ut8)(c)] |= (cs)->mask, (cs)->hash += (c))

Definition at line 113 of file regex2.h.

◆ CHIN

#define CHIN (   cs,
  c 
)    ((cs)->ptr[(ut8)(c)] & (cs)->mask)

Definition at line 115 of file regex2.h.

◆ CHsub

#define CHsub (   cs,
  c 
)    ((cs)->ptr[(ut8)(c)] &= ~(cs)->mask, (cs)->hash -= (c))

Definition at line 114 of file regex2.h.

◆ ISWORD

#define ISWORD (   c)    (isalnum((ut8)(c)) || (c) == '_')

Definition at line 158 of file regex2.h.

◆ MAGIC1

#define MAGIC1   ((('r' ^ 0200) << 8) | 'e')

Definition at line 41 of file regex2.h.

◆ MAGIC2

#define MAGIC2   ((('R' ^ 0200) << 8) | 'E')

Definition at line 128 of file regex2.h.

◆ MCadd

#define MCadd (   p,
  cs,
  cp 
)    mcadd(p, cs, cp) /* regcomp() internal fns */

Definition at line 116 of file regex2.h.

◆ MCin

#define MCin (   p,
  cs,
  cp 
)    mcin(p, cs, cp)

Definition at line 118 of file regex2.h.

◆ MCsub

#define MCsub (   p,
  cs,
  cp 
)    mcsub(p, cs, cp)

Definition at line 117 of file regex2.h.

◆ O_BACK

#define O_BACK   (8LU << OPSHIFT) /* end \d paren number */

Definition at line 79 of file regex2.h.

◆ O_CH

#define O_CH   (18LU << OPSHIFT) /* end choice back to OOR1 */

Definition at line 89 of file regex2.h.

◆ O_PLUS

#define O_PLUS   (10LU << OPSHIFT) /* + suffix back to prefix */

Definition at line 81 of file regex2.h.

◆ O_QUEST

#define O_QUEST   (12LU << OPSHIFT) /* ? suffix back to prefix */

Definition at line 83 of file regex2.h.

◆ OANY

#define OANY   (5LU << OPSHIFT) /* . - */

Definition at line 76 of file regex2.h.

◆ OANYOF

#define OANYOF   (6LU << OPSHIFT) /* [...] set number */

Definition at line 77 of file regex2.h.

◆ OBACK_

#define OBACK_   (7LU << OPSHIFT) /* begin \d paren number */

Definition at line 78 of file regex2.h.

◆ OBOL

#define OBOL   (3LU << OPSHIFT) /* left anchor - */

Definition at line 74 of file regex2.h.

◆ OBOW

#define OBOW   (19LU << OPSHIFT) /* begin word - */

Definition at line 90 of file regex2.h.

◆ OCH_

#define OCH_   (15LU << OPSHIFT) /* begin choice fwd to OOR2 */

Definition at line 86 of file regex2.h.

◆ OCHAR

#define OCHAR   (2LU << OPSHIFT) /* character unsigned char */

Definition at line 73 of file regex2.h.

◆ OEND

#define OEND   (1LU << OPSHIFT) /* endmarker - */

Definition at line 72 of file regex2.h.

◆ OEOL

#define OEOL   (4LU << OPSHIFT) /* right anchor - */

Definition at line 75 of file regex2.h.

◆ OEOW

#define OEOW   (20LU << OPSHIFT) /* end word - */

Definition at line 91 of file regex2.h.

◆ OLPAREN

#define OLPAREN   (13LU << OPSHIFT) /* ( fwd to ) */

Definition at line 84 of file regex2.h.

◆ OOR1

#define OOR1   (16LU << OPSHIFT) /* | pt. 1 back to OOR1 or OCH_ */

Definition at line 87 of file regex2.h.

◆ OOR2

#define OOR2   (17LU << OPSHIFT) /* | pt. 2 fwd to OOR2 or O_CH */

Definition at line 88 of file regex2.h.

◆ OP

#define OP (   n)    ((n)&OPRMASK)

Definition at line 67 of file regex2.h.

◆ OPDMASK

#define OPDMASK   0x07ffffffLU

Definition at line 65 of file regex2.h.

◆ OPLUS_

#define OPLUS_   (9LU << OPSHIFT) /* + prefix fwd to suffix */

Definition at line 80 of file regex2.h.

◆ OPND

#define OPND (   n)    ((n)&OPDMASK)

Definition at line 68 of file regex2.h.

◆ OPRMASK

#define OPRMASK   0xf8000000LU

Definition at line 64 of file regex2.h.

◆ OPSHIFT

#define OPSHIFT   ((unsigned)27)

Definition at line 66 of file regex2.h.

◆ OQUEST_

#define OQUEST_   (11LU << OPSHIFT) /* ? prefix fwd to suffix */

Definition at line 82 of file regex2.h.

◆ ORPAREN

#define ORPAREN   (14LU << OPSHIFT) /* ) back to ( */

Definition at line 85 of file regex2.h.

◆ OUT

#define OUT   (-CHAR_MIN + CHAR_MAX + 1) /* a non-character value */

Definition at line 157 of file regex2.h.

◆ SOP

#define SOP (   op,
  opnd 
)    ((op) | (opnd))

Definition at line 69 of file regex2.h.

◆ USEBOL

#define USEBOL   01 /* used ^ */

Definition at line 139 of file regex2.h.

◆ USEEOL

#define USEEOL   02 /* used $ */

Definition at line 140 of file regex2.h.

Typedef Documentation

◆ cat_t

typedef unsigned char cat_t

Definition at line 121 of file regex2.h.

◆ sop

typedef unsigned long sop

Definition at line 62 of file regex2.h.

◆ sopno

typedef long sopno

Definition at line 63 of file regex2.h.