scanner.h

来自「c++编写的命令行解释器」· C头文件 代码 · 共 23 行

H
23
字号
/***************************************************************
File: SCANNER.H               Copyright 1992 by Dlugosz Software
part of the CMDL package for command-line parsing
the scanner class, used as part of parsing the strings.
This version may be used freely, with attribution.
***************************************************************/

class cmdlscan {
   const char* source;  //name of where this came from (for error reports)
   cmdlscan* link;      //previous string
   char* s;     //the string being scanned
   int cursor;  //the current scan position
public:
   cmdlscan (char* s);
   int mark() { return cursor; };
   void restore (int x) { cursor= x; };
   void skipws();  //skip whitespace
   void extract_word (char* buf, int len);
   void operator++ () { cursor++; }
   char thischar() { return s[cursor]; }
   char* extract_string();
   };

⌨️ 快捷键说明

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