GRMRGRPH.H
资源名称:ictprop.rar [点击查看]
上传用户:tenhai
上传日期:2021-02-19
资源大小:492k
文件大小:2k
源码类别:
组合框控件
开发平台:
Visual C++
- #ifndef GRMRGRPH_H
- #define GRMRGRPH_H
- #include "symbtbl.h"
- extern symbol_node_ref_tbl_t t_tbl, nt_tbl;
- #define MAXRULES 1000
- #define MAXROLES 500
- #define MAXRLEN 50
- #define tcount t_tbl.tblsize
- #define ntcount nt_tbl.tblsize
- extern unsigned int tntcount;
- #define code2tnode(code) tblinfo(t_tbl, code)
- #define code2ntnode(code) tblinfo(nt_tbl, code-tcount)
- #define code2node(code) ((code>=tcount)?code2ntnode(code):code2tnode(code))
- #define code2token(code) code2node(code)->literal
- extern unsigned int token2tcode(char *token);
- typedef struct ruleindex_t{
- unsigned int length;
- unsigned int leftcate;
- unsigned int fstidx;
- double probability;
- }ruleindex_t;
- extern ruleindex_t *ruleindex;
- extern symbol_node_t **symserial;
- extern int arccount;
- extern unsigned int rulcount, rulupbound;
- #define rightlenof(i) ruleindex[i].length
- #define serialof(i,j) ruleindex[i].fstidx+j
- #define probof(i) ruleindex[i].probability
- #define leftof(i) ruleindex[i].leftcate
- #define rightof(i, j) symserial[serialof(i, j)]->sid
- extern symbol_node_t *ssym, *fsym;
- extern int grmrindxinit(void);
- extern int grmrindxfini(void);
- extern int serialize(symbol_node_t *psym);
- extern int releasenode(symbol_node_t *psym);
- extern symbol_node_t *instnode(char *token, int tokensize, char mode);
- extern symbol_node_t *instfinode(void);
- extern int numnodes(void);
- extern symbol_arc_t *reltnodes(symbol_node_t *from,
- symbol_node_t *to,
- unsigned int rule, unsigned int role,
- char mode);
- extern int releasenodes(void);
- extern int releasegrmr(void);
- #endif