xsb_re_match.c File Reference

#include "xsb_config.h"
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include "auxlry.h"
#include "cell_xsb.h"
#include "error_xsb.h"
#include "cinterf.h"
#include "heap_xsb.h"

Data Structures

struct  regexp_tbl_entry

Defines

#define REGEXP_TBL_SIZE   17
#define NMATCH   31
#define GET_MATCH_PTR(i)   (input_string + match_array[i].rm_so)
#define GET_MATCH_SIZE(i)   (match_array[i].rm_eo - match_array[i].rm_so)
#define ERR_MSG_LEN   100

Functions

char * p_charlist_to_c_string (prolog_term term, VarString *outstring, char *in_func, char *where)
void c_string_to_p_charlist (char *name, prolog_term list, char *in_func, char *where)
unsigned long hash (char *objname, byte arity, unsigned long tbl_size)
static int xsb_re_match (char *regexp_ptr, char *match_str, int match_flags, regmatch_t **match_array, int *paren_number, char *context)
static void initialize_regexp_tbl (void)
static int make_flags (prolog_term flag_term, char *context)
static XSB_StrDefine (input_buffer)
static XSB_StrDefine (subst_buf)
static XSB_StrDefine (output_buffer)
static XSB_StrDefine (regexp_buffer)
int do_regmatch__ (void)
int do_bulkmatch__ (void)
int do_regsubstitute__ (void)
int do_regsubstring__ (void)
static XSB_StrDefine (temp_buffer)
int do_regcharlist_to_string__ (void)

Variables

static struct regexp_tbl_entry regexp_tbl [REGEXP_TBL_SIZE]
static int first_call = TRUE

Define Documentation

#define ERR_MSG_LEN   100
 

#define GET_MATCH_PTR i   )     (input_string + match_array[i].rm_so)
 

#define GET_MATCH_SIZE i   )     (match_array[i].rm_eo - match_array[i].rm_so)
 

#define NMATCH   31
 

#define REGEXP_TBL_SIZE   17
 


Function Documentation

void c_string_to_p_charlist char *  name,
prolog_term  list,
char *  in_func,
char *  where
 

int do_bulkmatch__ void   ) 
 

int do_regcharlist_to_string__ void   ) 
 

int do_regmatch__ void   ) 
 

int do_regsubstitute__ void   ) 
 

int do_regsubstring__ void   ) 
 

unsigned long hash char *  objname,
byte  arity,
unsigned long  tbl_size
 

void initialize_regexp_tbl void   )  [static]
 

static int make_flags prolog_term  flag_term,
char *  context
[static]
 

char* p_charlist_to_c_string prolog_term  term,
VarString outstring,
char *  in_func,
char *  where
 

static int xsb_re_match char *  regexp_ptr,
char *  match_str,
int  match_flags,
regmatch_t **  match_array,
int paren_number,
char *  context
[static]
 

static XSB_StrDefine temp_buffer   )  [static]
 

static XSB_StrDefine regexp_buffer   )  [static]
 

static XSB_StrDefine output_buffer   )  [static]
 

static XSB_StrDefine subst_buf   )  [static]
 

static XSB_StrDefine input_buffer   )  [static]
 


Variable Documentation

int first_call = TRUE [static]
 

struct regexp_tbl_entry regexp_tbl[REGEXP_TBL_SIZE] [static]
 


Generated on Wed Jul 26 13:26:55 2006 for XSB by  doxygen 1.4.5