mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
742 B
35 lines
742 B
// 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
|