tclRegexp.hGo to the documentation of this file.00001 /* 00002 * tclRegexp.h -- 00003 * 00004 * This file contains definitions used internally by Henry Spencer's 00005 * regular expression code. 00006 * 00007 * Copyright (c) 1998 by Sun Microsystems, Inc. 00008 * Copyright (c) 1998-1999 by Scriptics Corporation. 00009 * 00010 * See the file "license.terms" for information on usage and redistribution of 00011 * this file, and for a DISCLAIMER OF ALL WARRANTIES. 00012 * 00013 * RCS: @(#) $Id: tclRegexp.h,v 1.15 2007/12/13 15:23:20 dgp Exp $ 00014 */ 00015 00016 #ifndef _TCLREGEXP 00017 #define _TCLREGEXP 00018 00019 #include "regex.h" 00020 00021 /* 00022 * The TclRegexp structure encapsulates a compiled regex_t, the flags that 00023 * were used to compile it, and an array of pointers that are used to indicate 00024 * subexpressions after a call to Tcl_RegExpExec. Note that the string and 00025 * objPtr are mutually exclusive. These values are needed by Tcl_RegExpRange 00026 * in order to return pointers into the original string. 00027 */ 00028 00029 typedef struct TclRegexp { 00030 int flags; /* Regexp compile flags. */ 00031 regex_t re; /* Compiled re, includes number of 00032 * subexpressions. */ 00033 CONST char *string; /* Last string passed to Tcl_RegExpExec. */ 00034 Tcl_Obj *objPtr; /* Last object passed to Tcl_RegExpExecObj. */ 00035 Tcl_Obj *globObjPtr; /* Glob pattern rep of RE or NULL if none. */ 00036 regmatch_t *matches; /* Array of indices into the Tcl_UniChar 00037 * representation of the last string matched 00038 * with this regexp to indicate the location 00039 * of subexpressions. */ 00040 rm_detail_t details; /* Detailed information on match (currently 00041 * used only for REG_EXPECT). */ 00042 int refCount; /* Count of number of references to this 00043 * compiled regexp. */ 00044 } TclRegexp; 00045 00046 #endif /* _TCLREGEXP */ 00047 00048 /* 00049 * Local Variables: 00050 * mode: c 00051 * c-basic-offset: 4 00052 * fill-column: 78 00053 * End: 00054 */
Generated on Wed Mar 12 12:18:21 2008 by 1.5.1 |