//---------------------------------------------------------------------------

#ifndef lexanedifH
#define lexanedifH
//---------------------------------------------------------------------------
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <list>
#include <queue>
#include <string>
#include "lexan.h"

using namespace std;

//---------------------------------------------------------------------------
#define LEX_E_NULL                 0
#define LEX_E_ERROR                1
#define LEX_E_EDIF                 2  //kw
#define LEX_E_NAME                 3  //kw
#define LEX_E_RENAME               4  //kw
#define LEX_E_EDIFVERSION          5  //kw
#define LEX_E_EDIFLEVEL            6  //kw
#define LEX_E_KEYWORDLEVEL         7  //kw
#define LEX_E_KEYWORDMAP           8  //kw
#define LEX_E_TIMESTAMP            9  //kw
#define LEX_E_WRITTEN             10 //kw
#define LEX_E_AUTHOR              11 //kw
#define LEX_E_PROGRAM             12 //kw
#define LEX_E_VERSION             13
#define LEX_E_LIBRARY             14
#define LEX_E_TECHNOLOGY          15
#define LEX_E_INTEGERTOKEN        16
#define LEX_E_REALTOKEN           17
#define LEX_E_NUMBERDEFINITION    18
#define LEX_E_CELL                19
#define LEX_E_CELLTYPE            20
#define LEX_E_TIE                 21
#define LEX_E_RIPPER              22
#define LEX_E_LPA                 23
#define LEX_E_RPA                 24
#define LEX_E_GENERIC             25
#define LEX_E_VIEW                26
#define LEX_E_NETLIST             27
#define LEX_E_IDENT               28
#define LEX_E_VIEWTYPE            29
#define LEX_E_INTERFACE           30
#define LEX_E_PORT                31
#define LEX_E_ARRAY               32
#define LEX_E_CONTENTS            33
#define LEX_E_VIEWREF             34
#define LEX_E_LIBRARYREF          35
#define LEX_E_NET                 36
#define LEX_E_JOINED              37
#define LEX_E_PORTREF             38
#define LEX_E_MEMBER              39
#define LEX_E_DESIGN              40
#define LEX_E_PROPERTY            41
#define LEX_E_STRING              42
#define LEX_E_OWNER               43
#define LEX_E_CELLREF             44
#define LEX_E_STATUS              45
#define LEX_E_INPUT             1000
#define LEX_E_OUTPUT            1001
#define LEX_E_INOUT               48
#define LEX_E_DIRECTION           49
#define LEX_E_STRINGTOKEN         50
#define LEX_E_INSTANCE            51
#define LEX_E_INSTANCEREF         52
#define LEX_E_VIEWLIST            53
#define LEX_E_EXTERNAL            54
#define LEX_E_SIMULATIONINFO      55
#define LEX_E_LOGICVALUE          56
#define LEX_E_BOOLEANMAP          57
#define LEX_E_BOOLEANVALUE        58
#define LEX_E_BOOLEAN             59
#define LEX_E_DATAORIGIN          60
#define LEX_E_TRUE		61
#define LEX_E_FALSE		62
#define LEX_E_BOOLTOKEN		63	// the lex analyzer never produces this
#define LEX_E_INTEGER		64

//---------------------------------------------------------------------------

class LexanEdif: public Lexan {
   void kw_init();
public:
   int Lex_AInt;
   double Lex_AReal;
   std::string Lex_AStr;
   LexanEdif(const char *);
   LexanEdif(void) {}
   void init(const char *);
   int NextToken();
   int LookAhead();
   queue<int> qtoken;
};

//---------------------------------------------------------------------------


#endif
