LLVM 20.0.0git
Classes | Macros | Typedefs
regex2.h File Reference
#include "regutils.h"
#include <stddef.h>

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[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
 
#define CHsub(cs, c)   ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
 
#define CHIN(cs, c)   ((cs)->ptr[(uch)(c)] & (cs)->mask)
 
#define MCadd(p, cs, cp)   mcadd(p, cs, cp) /* llvm_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 REGEX_BAD   04 /* something wrong */
 
#define OUT   (CHAR_MAX+1) /* a non-character value */
 
#define ISWORD(c)   (isalnum(c&0xff) || (c) == '_')
 

Typedefs

typedef unsigned long sop
 
typedef long sopno
 
typedef unsigned char cat_t
 

Macro Definition Documentation

◆ CHadd

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

Definition at line 119 of file regex2.h.

◆ CHIN

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

Definition at line 121 of file regex2.h.

◆ CHsub

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

Definition at line 120 of file regex2.h.

◆ ISWORD

#define ISWORD (   c)    (isalnum(c&0xff) || (c) == '_')

Definition at line 163 of file regex2.h.

◆ MAGIC1

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

Definition at line 47 of file regex2.h.

◆ MAGIC2

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

Definition at line 134 of file regex2.h.

◆ MCadd

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

Definition at line 122 of file regex2.h.

◆ MCin

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

Definition at line 124 of file regex2.h.

◆ MCsub

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

Definition at line 123 of file regex2.h.

◆ O_BACK

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

Definition at line 85 of file regex2.h.

◆ O_CH

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

Definition at line 95 of file regex2.h.

◆ O_PLUS

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

Definition at line 87 of file regex2.h.

◆ O_QUEST

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

Definition at line 89 of file regex2.h.

◆ OANY

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

Definition at line 82 of file regex2.h.

◆ OANYOF

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

Definition at line 83 of file regex2.h.

◆ OBACK_

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

Definition at line 84 of file regex2.h.

◆ OBOL

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

Definition at line 80 of file regex2.h.

◆ OBOW

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

Definition at line 96 of file regex2.h.

◆ OCH_

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

Definition at line 92 of file regex2.h.

◆ OCHAR

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

Definition at line 79 of file regex2.h.

◆ OEND

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

Definition at line 78 of file regex2.h.

◆ OEOL

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

Definition at line 81 of file regex2.h.

◆ OEOW

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

Definition at line 97 of file regex2.h.

◆ OLPAREN

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

Definition at line 90 of file regex2.h.

◆ OOR1

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

Definition at line 93 of file regex2.h.

◆ OOR2

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

Definition at line 94 of file regex2.h.

◆ OP

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

Definition at line 73 of file regex2.h.

◆ OPDMASK

#define OPDMASK   0x07ffffffLU

Definition at line 71 of file regex2.h.

◆ OPLUS_

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

Definition at line 86 of file regex2.h.

◆ OPND

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

Definition at line 74 of file regex2.h.

◆ OPRMASK

#define OPRMASK   0xf8000000LU

Definition at line 70 of file regex2.h.

◆ OPSHIFT

#define OPSHIFT   ((unsigned)27)

Definition at line 72 of file regex2.h.

◆ OQUEST_

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

Definition at line 88 of file regex2.h.

◆ ORPAREN

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

Definition at line 91 of file regex2.h.

◆ OUT

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

Definition at line 162 of file regex2.h.

◆ REGEX_BAD

#define REGEX_BAD   04 /* something wrong */

Definition at line 147 of file regex2.h.

◆ SOP

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

Definition at line 75 of file regex2.h.

◆ USEBOL

#define USEBOL   01 /* used ^ */

Definition at line 145 of file regex2.h.

◆ USEEOL

#define USEEOL   02 /* used $ */

Definition at line 146 of file regex2.h.

Typedef Documentation

◆ cat_t

typedef unsigned char cat_t

Definition at line 127 of file regex2.h.

◆ sop

typedef unsigned long sop

Definition at line 68 of file regex2.h.

◆ sopno

typedef long sopno

Definition at line 69 of file regex2.h.