windows-nt/Source/XPSP1/NT/drivers/tpg/hwx/factoid/inc/ptree.h
2020-09-26 16:20:57 +08:00

36 lines
742 B
C

// ptree.h
#ifndef __INC_PTREE_H
#define __INC_PTREE_H
#include "common.h"
#include "intset.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct tagPARSETREE {
int value;
BOOL nullable;
IntSet FirstPos;
IntSet LastPos;
unsigned int position; // used only for leaves
struct tagPARSETREE *left;
struct tagPARSETREE *right;
} PARSETREE;
void DestroyPARSETREE(PARSETREE *tree);
PARSETREE *MakePARSETREE(int value);
PARSETREE *MergePARSETREE(PARSETREE *tree1, PARSETREE *tree2);
int SizePARSETREE(PARSETREE *tree);
PARSETREE *CopyPARSETREE(PARSETREE *tree);
BOOL MakePureRegularExpression(PARSETREE *tree);
int ComputeNodeAttributes(PARSETREE *tree, IntSet **paFollowpos, WCHAR **paPos2Wchar);
#ifdef __cplusplus
}
#endif
#endif