Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

pdl_rule.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright (c) 2003 EU DataGrid        http://www.eu-datagrid.org/
00003  *
00004  *   $Id: pdl_rule.h,v 1.11 2003/07/31 10:33:00 venekamp Exp $
00005  *
00006  *   Copyright (c) 2003 by
00007  *      G.M. Venekamp <venekamp@nikhef.nl>
00008  *      NIKHEF Amsterdam, the Netherlands
00009  *
00010  *   This software is distributed under a BSD-style open source
00011  *   licence. For a complete description of the licence take a look
00012  *   at: http://eu-datagrid.web.cern.ch/eu-datagrid/license.html
00013  *
00014  */
00015 
00016 
00029 #ifndef _PDL_RULE_H
00030 #define _PDL_RULE_H
00031 
00032 #include "pdl.h"
00033 
00034 
00040 typedef struct rule_s {
00041   const char* state;         
00042   const char* true_branch;   
00043   const char* false_branch;  
00044   unsigned int lineno;       
00045   struct rule_s* next;       
00046 } rule_t;
00047 
00048 
00052 typedef enum {
00053   STATE,          
00054   TRUE_BRANCH,    
00055   FALSE_BRANCH    
00056 } rule_type_t;
00057 
00058 
00062 typedef enum {
00063   NO_RECURSION      = 0x00,   
00064   RECURSION         = 0x01,   
00065   RECURSION_HANDLED = 0x02    
00066 } recursion_t;
00067 
00068 
00072 typedef enum {
00073   left_side,   
00074   right_side   
00075 } side_t;
00076 
00077 
00078 extern rule_t* add_rule(record_t* state, record_t* true_branch, record_t* false_branch);
00079 extern void free_rules(rule_t* rule);
00080 extern const rule_t* find_state(const rule_t* rule, const char* state);
00081 extern void show_rules(const rule_t* rule);
00082 extern void start_new_rules(void);
00083 extern const rule_t* get_top_rule(void);
00084 extern void  allow_new_rules(BOOL allow);
00085 extern const rule_t* get_rule(const char* rule, side_t side);
00086 extern void set_top_rule(const rule_t* rule);
00087 extern BOOL check_rule_for_recursion(const rule_t* rule);
00088 extern void reduce_rule(rule_t* rule);
00089 
00090 #endif

Generated at Thu Mar 4 17:39:03 2004 for edg-lcmaps by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001