//#include "globals_gram.h"

/* flags */
extern int	verbose;
extern int	extract;
extern int	MAX_PARSES;
extern int	USE_HISTORY;
extern int	PROFILE;
extern int	IGNORE_OOV;
extern int	ALL_PARSES;
extern int	BIGRAM_PRUNE;
extern int	MAX_PATHS;	/* if set, limit max paths expanded */

/* file and dir names */
extern char	*dir;
extern char	*config_file;

/* lists of nets used in parse*/
extern int	*cur_nets;	/* set of nets to be used in this parse */
extern int	num_active;	/* length of cur_nets */
extern int	num_nets;	/* number of nets read in */
extern int	num_nets;
extern int	num_frames;
extern int	max_pri;

extern Gram	*gram;			/* grammar */

extern int	start_token;
extern int      end_token;

/* parser structures */
extern int	*script;	/* array of word nums for input line */
extern int	script_len;	/* number of words in script */
extern int	*matched_script;	/* words included in parse */
extern char	fun_wrds[];	/* flags indicating function words */
extern int	num_parses;

/* buffers */
extern int	EdgeBufSize;	/* max number of paths in beam */
extern int	ChartBufSize;	/* max number of paths in beam */
extern int	PeBufSize;	/* number of Val slots for trees  */
extern int	InputBufSize;	/* max words in line of input */
extern int	SlotSeqLen;	/* max number of slots in a sequence */
extern int	ParseBufSize;	/* buffer for parses */
extern int	SeqBufSize;	/* buffer for sequence nodes */
extern int	FrameBufSize;	/* buffer for frame nodes */

/* parser buffers */
extern EdgeLink	**chart;	/* chart of matched nets */
extern EdgeLink	*edge_link_buf;	/* buffer of nodes to link edges in lists */
extern EdgeLink	*edge_link_end;
extern EdgeLink	*edge_link_ptr;
extern Edge 	*edge_buf;	/* buffer of chart edges */
extern Edge 	*edge_buf_end; 
extern Edge 	*edge_ptr;	/* ptr to next free edge in buf */
extern Edge	**pe_buf;	/* buffer for trees pointed to by edges */
extern Edge 	**pe_buf_end;
extern Edge 	**pe_buf_ptr;

extern char	*print_line;	/* buffer for output */


extern int	*active_slots;	/* set of slot level nets used in forms */
extern int	num_active;
extern int	SymBufSize;	/* buffer size to hold char strings */

