LLVM  8.0.0svn
Classes | Macros | Typedefs
regex2.h File Reference
#include "regutils.h"
#include <stddef.h>
Include dependency graph for regex2.h:
This graph shows which files directly or indirectly include this file:

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.

Referenced by p_b_cclass(), p_b_eclass(), p_b_term(), and p_bracket().

◆ CHIN

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

Definition at line 121 of file regex2.h.

Referenced by firstch(), freezeset(), nch(), and p_bracket().

◆ CHsub

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

Definition at line 120 of file regex2.h.

Referenced by freeset(), and p_bracket().

◆ 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.

Referenced by llvm_regcomp(), llvm_regexec(), and llvm_regfree().

◆ MAGIC2

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

Definition at line 134 of file regex2.h.

Referenced by llvm_regcomp(), llvm_regexec(), and llvm_regfree().

◆ MCadd

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

Definition at line 122 of file regex2.h.

Referenced by p_b_cclass().

◆ 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.

Referenced by p_ere_exp(), and p_simp_re().

◆ O_CH

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

Definition at line 95 of file regex2.h.

Referenced by findmust(), p_ere(), p_ere_exp(), and repeat().

◆ O_PLUS

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

Definition at line 87 of file regex2.h.

Referenced by p_ere_exp(), p_simp_re(), pluscount(), and repeat().

◆ O_QUEST

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

Definition at line 89 of file regex2.h.

Referenced by findmust(), p_ere_exp(), and p_simp_re().

◆ OANY

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

Definition at line 82 of file regex2.h.

Referenced by p_ere_exp(), and p_simp_re().

◆ OANYOF

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

Definition at line 83 of file regex2.h.

Referenced by p_bracket().

◆ OBACK_

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

Definition at line 84 of file regex2.h.

Referenced by p_ere_exp(), and p_simp_re().

◆ OBOL

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

Definition at line 80 of file regex2.h.

Referenced by p_bre(), and p_ere_exp().

◆ OBOW

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

Definition at line 96 of file regex2.h.

Referenced by p_bracket().

◆ OCH_

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

Definition at line 92 of file regex2.h.

Referenced by findmust(), p_ere(), p_ere_exp(), and repeat().

◆ OCHAR

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

Definition at line 79 of file regex2.h.

Referenced by findmust(), and ordinary().

◆ OEND

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

Definition at line 78 of file regex2.h.

Referenced by findmust(), llvm_regcomp(), and pluscount().

◆ OEOL

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

Definition at line 81 of file regex2.h.

Referenced by p_bre(), and p_ere_exp().

◆ OEOW

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

Definition at line 97 of file regex2.h.

Referenced by p_bracket().

◆ OLPAREN

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

Definition at line 90 of file regex2.h.

Referenced by findmust(), p_ere_exp(), and p_simp_re().

◆ OOR1

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

Definition at line 93 of file regex2.h.

Referenced by p_ere(), p_ere_exp(), and repeat().

◆ OOR2

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

Definition at line 94 of file regex2.h.

Referenced by findmust(), p_ere(), p_ere_exp(), and repeat().

◆ OP

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

◆ 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.

Referenced by findmust(), p_ere_exp(), p_simp_re(), pluscount(), and repeat().

◆ OPND

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

Definition at line 74 of file regex2.h.

Referenced by findmust().

◆ 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.

Referenced by doemit(), and dofwd().

◆ OQUEST_

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

Definition at line 88 of file regex2.h.

Referenced by findmust(), p_ere_exp(), and p_simp_re().

◆ ORPAREN

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

Definition at line 91 of file regex2.h.

Referenced by findmust(), p_ere_exp(), and p_simp_re().

◆ OUT

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

Definition at line 162 of file regex2.h.

Referenced by llvm_regcomp().

◆ REGEX_BAD

#define REGEX_BAD   04 /* something wrong */

Definition at line 147 of file regex2.h.

Referenced by findmust(), llvm_regcomp(), llvm_regexec(), and pluscount().

◆ SOP

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

Definition at line 75 of file regex2.h.

Referenced by doemit().

◆ USEBOL

#define USEBOL   01 /* used ^ */

Definition at line 145 of file regex2.h.

Referenced by p_bre(), and p_ere_exp().

◆ USEEOL

#define USEEOL   02 /* used $ */

Definition at line 146 of file regex2.h.

Referenced by p_bre(), and p_ere_exp().

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.