1 |
/* Eliot */ |
/* Eliot */ |
2 |
/* Copyright (C) 1999 antoine.fraboulet */ |
/* Copyright (C) 1999 Antoine Fraboulet */ |
|
/* antoine.fraboulet@free.fr */ |
|
3 |
/* */ |
/* */ |
4 |
/* This program is free software; you can redistribute it and/or modify */ |
/* This file is part of Eliot. */ |
5 |
|
/* */ |
6 |
|
/* Eliot is free software; you can redistribute it and/or modify */ |
7 |
/* it under the terms of the GNU General Public License as published by */ |
/* it under the terms of the GNU General Public License as published by */ |
8 |
/* the Free Software Foundation; either version 2 of the License, or */ |
/* the Free Software Foundation; either version 2 of the License, or */ |
9 |
/* (at your option) any later version. */ |
/* (at your option) any later version. */ |
10 |
/* */ |
/* */ |
11 |
/* This program is distributed in the hope that it will be useful, */ |
/* Elit is distributed in the hope that it will be useful, */ |
12 |
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ |
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ |
13 |
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ |
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ |
14 |
/* GNU General Public License for more details. */ |
/* GNU General Public License for more details. */ |
39 |
#define NODE_AND 3 |
#define NODE_AND 3 |
40 |
#define NODE_STAR 4 |
#define NODE_STAR 4 |
41 |
#define NODE_PLUS 5 |
#define NODE_PLUS 5 |
|
#define NODE_QMARK 6 |
|
42 |
|
|
43 |
typedef struct node { |
typedef struct node { |
44 |
int type; |
int type; |
60 |
/** |
/** |
61 |
* special terminals that should not appear in the dictionary |
* special terminals that should not appear in the dictionary |
62 |
*/ |
*/ |
63 |
|
#define RE_EPSILON (DIC_LETTERS + 0) |
64 |
#define RE_FINAL_TOK (DIC_LETTERS + 1) |
#define RE_FINAL_TOK (DIC_LETTERS + 1) |
65 |
#define RE_ALL_MATCH (DIC_LETTERS + 2) |
#define RE_ALL_MATCH (DIC_LETTERS + 2) |
66 |
#define RE_VOWL_MATCH (DIC_LETTERS + 3) |
#define RE_VOWL_MATCH (DIC_LETTERS + 3) |
137 |
char msg[MAX_REGEXP_ERROR_LENGTH]; |
char msg[MAX_REGEXP_ERROR_LENGTH]; |
138 |
}; |
}; |
139 |
|
|
|
#ifdef DEBUG_RE |
|
140 |
#include <stdio.h> |
#include <stdio.h> |
141 |
|
|
142 |
void regexp_print_letter(FILE* f, char l); |
void regexp_print_letter(FILE* f, char l); |
144 |
void regexp_print_PS(int PS[]); |
void regexp_print_PS(int PS[]); |
145 |
void regexp_print_ptl(int ptl[]); |
void regexp_print_ptl(int ptl[]); |
146 |
void regexp_print_tree(NODE* n, char* name, int detail); |
void regexp_print_tree(NODE* n, char* name, int detail); |
|
#endif |
|
147 |
|
|
148 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |
149 |
} |
} |