The R Project SVN R

Rev

Rev 56370 | Rev 65805 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 56370 Rev 57571
Line 112... Line 112...
112
#endif
112
#endif
113
 
113
 
114
#ifdef TRE_USE_SYSTEM_WCTYPE
114
#ifdef TRE_USE_SYSTEM_WCTYPE
115
/* Use system provided iswctype() and wctype(). */
115
/* Use system provided iswctype() and wctype(). */
116
typedef wctype_t tre_ctype_t;
116
typedef wctype_t tre_ctype_t;
117
#define tre_isctype iswctype
117
#define tre_isctype(c, type) iswctype(c, type)
118
#define tre_ctype   wctype
118
#define tre_ctype(s)   wctype(s)
119
#else /* !TRE_USE_SYSTEM_WCTYPE */
119
#else /* !TRE_USE_SYSTEM_WCTYPE */
120
/* Define our own versions of iswctype() and wctype(). */
120
/* Define our own versions of iswctype() and wctype(). */
121
typedef int (*tre_ctype_t)(tre_cint_t);
121
typedef int (*tre_ctype_t)(tre_cint_t);
122
#define tre_isctype(c, type) ( (type)(c) )
122
#define tre_isctype(c, type) ( (type)(c) )
123
tre_ctype_t tre_ctype(const char *name);
123
tre_ctype_t tre_ctype(const char *name);
Line 149... Line 149...
149
   the terminator is a transition with NULL `state'. */
149
   the terminator is a transition with NULL `state'. */
150
typedef struct tnfa_transition tre_tnfa_transition_t;
150
typedef struct tnfa_transition tre_tnfa_transition_t;
151
 
151
 
152
struct tnfa_transition {
152
struct tnfa_transition {
153
  /* Range of accepted characters. */
153
  /* Range of accepted characters. */
-
 
154
#if 0 /* [i_a] must be able to carry the full span of all [Unicode] character codes *PLUS* these 'specials': TAG, PARAMETER, BACKREF, ASSERTION and EMPTY */
154
  tre_cint_t code_min;
155
  tre_cint_t code_min;
155
  tre_cint_t code_max;
156
  tre_cint_t code_max;
-
 
157
#else
-
 
158
  int code_min;
-
 
159
  int code_max;
-
 
160
#endif
156
  /* Pointer to the destination state. */
161
  /* Pointer to the destination state. */
157
  tre_tnfa_transition_t *state;
162
  tre_tnfa_transition_t *state;
158
  /* ID number of the destination state. */
163
  /* ID number of the destination state. */
159
  int state_id;
164
  int state_id;
160
  /* -1 terminated array of tags (or NULL). */
165
  /* -1 terminated array of tags (or NULL). */
Line 164... Line 169...
164
  /* Assertion bitmap. */
169
  /* Assertion bitmap. */
165
  int assertions;
170
  int assertions;
166
  /* Assertion parameters. */
171
  /* Assertion parameters. */
167
  union {
172
  union {
168
    /* Character class assertion. */
173
    /* Character class assertion. */
169
    tre_ctype_t class;
174
    tre_ctype_t classt;
170
    /* Back reference assertion. */
175
    /* Back reference assertion. */
171
    int backref;
176
    int backref;
172
  } u;
177
  } u;
173
  /* Negative character class assertions. */
178
  /* Negative character class assertions. */
174
  tre_ctype_t *neg_classes;
179
  tre_ctype_t *neg_classes;