/*
 * Syntactic parser (header)
 *
 * Author(s) : Catalin Dumitrescu (catalind@acm.org)
 *
 * File: analyzer.hh
 * Created: Mon Aug 27 10:15:57 CDT 2001
 *
 */

#ifndef _ANALYZER_
#define _ANALYZER_

#include <string>
using namespace std;

#include "token.hh"
#include "object.hh"
#include "environ.hh"
#include "scheme_exc.hh"

class anaException : public schemeException {
public:
  anaException (string s) : schemeException (s) { }
};

class analyzer {
  string prompt;
  token* reader;
  bool self_reader;

  void _eatEnd (char*, environ*) throw (schemeException);

public:
  analyzer ();
  analyzer (token*);
  virtual ~analyzer ();

  void setPrompt (string s) { prompt = s; }
  analyzer* showPrompt ();
  object* getNext (environ*) throw (schemeException);

};

#endif // _ANALYZER_




