Logo Search packages:      
Sourcecode: icemc version File versions  Download package


 * IceMC - a menu editor for IceWM
 * Copyright (c) 2000 Georg Mittendorfer

// IceMenuCompiler.h - headerfile for IceMenuScanner and IceMenuInParser
// created:       mig 000720
// modified:      mig 001001


#include "IceMC.h"

00017 class IceMenuScanner {
  // data
  enum symbolCode { noSy, eolSy, eofSy, quoteSy, lBraceSy, rBraceSy,
                menuSy, progSy, restartSy, separatorSy, identSy, quotedIdentSy,
                    menufileSy, menuprogSy};
  // methods
  IceMenuScanner(const QString filePath);
  virtual ~IceMenuScanner();
  virtual void setFile(const QString filePath);
  virtual symbolCode newSy();
  virtual QString getIdentStr() const;
  virtual void getActPos(int& line, int& sy);
  // data
  symbolCode sy;
  QString identStr;
  QString srcLine;
  uint synr;
  int lnr;
  QChar ch;
  QFile* src;
  QTextStream* srcStream;
  // methods
  virtual QChar newChar();
  virtual symbolCode skipRestOfLine();

class IceMenuInParser {
  virtual ~IceMenuInParser();
  virtual void parseFile(IceListView* menuList, const QString filePath);
  virtual void errorPos(int& lineNr, int& charNr);
  virtual bool successful();

      // data
  IceMenuScanner* scanner;
  IceMenuScanner::symbolCode sy;
  bool success;
  int errlnr;
  int errcnr;
      // methods
  virtual void identifier(QString& identStr);
  virtual void syntaxError();  

  virtual void s(IceListView* menuList);
  virtual void entry(IceListView* menuList, IceListViewItem* subList);
  virtual void menu(IceListViewItem* e);
  virtual void prog(IceListViewItem* e); // also handles restart
  virtual void menufile(IceListViewItem* e);
  virtual void menuprog(IceListViewItem* e);
  virtual QString name();
  virtual QString icon();
  virtual QString exec();
  virtual IceListViewItem* createItem(IceListView* menuList, IceListViewItem* subList,
                              IceListViewItem* lastItem, const QString command,
                              const QString name, const QString icon,
                              const QString exec);


Generated by  Doxygen 1.6.0   Back to index