VPR-7.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
slre.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  slre_option { SLRE_CASE_INSENSITIVE = 1 }
 
enum  slre_capture { SLRE_STRING, SLRE_INT, SLRE_FLOAT }
 

Functions

const char * slre_match (enum slre_option options, const char *regexp, const char *buf, int buf_len,...)
 

Enumeration Type Documentation

Enumerator
SLRE_STRING 
SLRE_INT 
SLRE_FLOAT 

Definition at line 81 of file slre.h.

Enumerator
SLRE_CASE_INSENSITIVE 

Definition at line 80 of file slre.h.

Function Documentation

const char* slre_match ( enum slre_option  options,
const char *  regexp,
const char *  buf,
int  buf_len,
  ... 
)

Definition at line 646 of file slre.c.

647  {
648  struct slre slre;
649  struct cap caps[20];
650  va_list ap;
651  const char *error_string = NULL;
652 
653  slre.options = options;
654  if ((error_string = compile2(&slre, re)) == NULL &&
655  (error_string = match2(&slre, buf, buf_len, caps)) == NULL) {
656  va_start(ap, buf_len);
657  error_string = capture(caps + 1, slre.num_caps, ap);
658  va_end(ap);
659  }
660 
661  return error_string;
662 }
static const char * match2(const struct slre *r, const char *buf, int len, struct cap *caps)
Definition: slre.c:571
int num_caps
Definition: slre.c:37
static const char * compile2(struct slre *r, const char *re)
Definition: slre.c:299
enum slre_option options
Definition: slre.c:39
static const char * capture(const struct cap *caps, int num_caps, va_list ap)
Definition: slre.c:626
Definition: slre.c:44
Definition: slre.c:32

+ Here is the call graph for this function:

+ Here is the caller graph for this function: