regexp.c File Reference


Detailed Description

Regular Expression functions.

Author:
Antoine Fraboulet
Date:
2005

Definition in file regexp.c.

#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "dic.h"
#include "regexp.h"
#include "automaton.h"

Go to the source code of this file.

Defines

#define PDBG(x)

Functions

NODEregexp_createNODE (int type, char v, NODE *fg, NODE *fd)
 Create a node for the syntactic tree used for parsing regular expressions
The fonction is called by bison grammar rules.
void regexp_delete_tree (NODE *root)
 delete regexp syntactic tree
void regexp_parcours (NODE *r, int *p, int *n, int ptl[])
 Computes positions, first positions (PP), last position (DP) and translation table 'position to letter' (ptl).
void regexp_possuivante (NODE *r, int PS[])
 Computes 'next position' table used for building the automaton.
void regexp_print_letter (FILE *f, char l)
void regexp_print_letter2 (FILE *f, char l)


Define Documentation

#define PDBG  ) 
 

Definition at line 44 of file regexp.c.


Function Documentation

NODE* regexp_createNODE int  type,
char  v,
NODE fg,
NODE fd
 

Create a node for the syntactic tree used for parsing regular expressions
The fonction is called by bison grammar rules.

Definition at line 48 of file regexp.c.

References node::annulable, node::DP, node::fd, node::fg, node::numero, node::position, node::PP, node::type, and node::var.

void regexp_delete_tree NODE root  ) 
 

delete regexp syntactic tree

Definition at line 64 of file regexp.c.

References node::fd, node::fg, and regexp_delete_tree().

Referenced by Dic_search_RegE(), and regexp_delete_tree().

void regexp_parcours NODE r,
int *  p,
int *  n,
int  ptl[]
 

Computes positions, first positions (PP), last position (DP) and translation table 'position to letter' (ptl).

Parameters:
r = root
p = current leaf position
n = current node number
ptl = position to letter

Definition at line 85 of file regexp.c.

References node::annulable, node::DP, node::fd, node::fg, NODE_AND, NODE_OR, NODE_PLUS, NODE_STAR, NODE_VAR, node::numero, node::position, node::PP, regexp_parcours(), node::type, and node::var.

Referenced by Dic_search_RegE(), and regexp_parcours().

void regexp_possuivante NODE r,
int  PS[]
 

Computes 'next position' table used for building the automaton.

Parameters:
r = root
PS = next position

Definition at line 139 of file regexp.c.

References node::DP, node::fd, node::fg, NODE_AND, NODE_PLUS, node::PP, regexp_possuivante(), and node::type.

Referenced by Dic_search_RegE(), and regexp_possuivante().

void regexp_print_letter FILE *  f,
char  l
 

Definition at line 222 of file regexp.c.

Referenced by s_automaton_NFA_to_DFA(), s_automaton_print_edges(), and s_automaton_successor().

void regexp_print_letter2 FILE *  f,
char  l
 

Definition at line 245 of file regexp.c.


Generated on Thu Dec 29 02:01:15 2005 for Eliot by  doxygen 1.4.5