~vcs-imports/mammoth-replicator/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef __WPARSER_H__
#define __WPARSER_H__
#include "postgres.h"
#include "fmgr.h"

typedef struct
{
	Oid			prs_id;
	FmgrInfo	start_info;
	FmgrInfo	getlexeme_info;
	FmgrInfo	end_info;
	FmgrInfo	headline_info;
	Oid			lextype;
	void	   *prs;
}	WParserInfo;

void		init_prs(Oid id, WParserInfo * prs);
WParserInfo *findprs(Oid id);
Oid			name2id_prs(text *name);
void		reset_prs(void);


typedef struct
{
	int			lexid;
	char	   *alias;
	char	   *descr;
}	LexDescr;

#endif