#ifndef _ATTRIBUTEPARSER_H
#define _ATTRIBUTEPARSER_H
#include <stdio.h>
#include <stdlib.h>

#include "Exception.h"
#include "Attributes.h"
#include "Item.h"
#include "ItemList.h"



void resetComplex();

void parseComplex(FILE *fp, 
		  Attributes *attributes,
		  ItemList *itemList,
		  Boolean *error, char *errorMsg,
		  Boolean debugIn = False );

#define ParserDebugOn True
/*
CLASS 
AttributeParser

DESCRIPTION
Utility class, provides interface to lex/yacc parser. These are kept
in a separate class (and .o file) to avoid redefinition errors of
yacc-generated functions. (Note that the GNU flex-bison allows you
to avoid this in a better way).

AUTHOR
Tom O'Reilly
*/
class AttributeParser {

public:
     
     ///////////////////////////////////////////////////////////////////
     // Parse attribute values from input file
     static void parse(const char *filename, Attributes *attributes,
		       Boolean debug = False)
	  throw (Exception);
     
     static void parse( const char *filename, ItemList *itemList,
		       Boolean debug = False)
	  throw( Exception );
     
     static void parse( const char *filename, Attributes *attributes,
			ItemList *itemList,
		       Boolean debug = False)
	  throw( Exception );

     static void reset()
	  { resetComplex(); };
     
  
};



#endif
