dynamicscanner.h

来自「用于词法分析的词法分析器」· C头文件 代码 · 共 42 行

H
42
字号
/* $Id: DynamicScanner.h,v 1.3 1997/02/02 01:31:03 matt Exp $   Elex dynamic scanner class.   (c) Matt Phillips 1996. */#ifndef _DYNAMIC_SCANNER#define _DYNAMIC_SCANNER#include <foo/FooObject.h>#include <cppscan/ElexScanner.h>class DynamicScanner : public ElexScanner{public:  enum {MySymERROR = -100};  // scandef should be a Foo scanner definition generated by elexc.  DynamicScanner (const FooObject &scandef, XInputStream &i);  ~DynamicScanner ();  // returns the name of the current production.  const string &getProduction () const {return production;}protected:  ElexScannerData scannerData;  ElexState *states;  int nStates;  string *prodNames;		// maps a state ID to a production name.  string production;		// the last matched production.  void generate (const FooObject &scandef);  ElexEdge *generateEdges (const FooObject::Objects &fooedges, 			   ElexState *states) const;  virtual int invokeProduction (int i);};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?