/*
******************************************************************************

                    Arizona State University
                     Department of Geology


lexical.h	1.15     3/1/94
******************************************************************************

*/

#ifndef LEXICAL_H
#define LEXICAL_H
static char sccsid_lexical_h[] = "@(#)lexical.h 1.15  3/1/94";

#include "stdinc.h"

#define TRUE 1
#define FALSE 0

/* Delimiter definitions */
#define INSTANCE_DELIM '*'
#define EQUALITY_DELIM ':'
#define COMMA ','
#define EOL '\n'
#define ESCAPE_CHAR '\\'
#define START_BLOCK '{'
#define END_BLOCK '}'
#define STRING_DELIM '"'
#define ARRAY_OPEN_DELIM '['
#define ARRAY_CLOSE_DELIM ']'
#define ARRAY_RANGE_DELIM '-'
#define SINGLE_VALUED 1
#define MANY_VALUED 0
#define INSTANCE_NEEDED 1
#define NO_INSTANCE 0

/* State definitions */
#define COMMENT 257
#define WORD 258
#define NEW_DRCTV 259
#define SINGLE_VALUE 260
#define VALUE_LIST 261
#define INSTANCE 262
#define DONE 263
#define STRING_STATE 264

/* Maximum line length handled by "getline" parsing function */
#define MAX_LINE_LEN 1024

/* Maximum length of directive value string */
#define MAX_VAL_LEN 255

struct Parameter
{
  int keyword;
  char c_key[255];
  char *cval;
};

struct ValidKeyword 
{
  char *name;
  int code;
  BOOLEAN single_value_only;
};


/* Function prototypes */
int get_inline_comment(FILE *, int, char *, int);
int get_entry_comment(FILE *, char *, int, char *, int, BOOLEAN);
int get_full_line(FILE *, char *, char *, int, BOOLEAN, int *);
int add_char(char **, int, int, int *);


#endif LEXICAL_H
