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

#ifndef pla_parserH
#define pla_parserH
//---------------------------------------------------------------------------
#include "lexan_pla.h"

class PlaParserClient {
public:
  virtual void haveInPorts(int portsCount, std::list<std::string> portsNames);
  virtual void haveOutPorts(int portsCount, std::list<std::string> portsNames);
  virtual void haveDescription(std::string& type, int inNo, int outNo, std::list<std::string>&, 
							   std::list<std::string>&, std::list<std::string> &matrix);
  virtual ~PlaParserClient () {};
};

class PlaParser {
private:
  PlaParserClient* client_;

  void matrixrow();

  std::string consName (const char* str, int no);

public:
  LexanPla l;
  int token;

  void run(std::istream&, const std::string&);
  PlaParser(PlaParserClient* client): client_(client) {}
};
#endif
