3d57d4ed43128cc17ed249139dfab19d939be1cc
[platform/upstream/groff.git] / src / preproc / html / pushback.h
1 // -*- C -*-
2 /* Copyright (C) 2000-2014  Free Software Foundation, Inc.
3      Written by Gaius Mulley (gaius@glam.ac.uk).
4
5 This file is part of groff.
6
7 groff is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20
21 #define eof              (char)-1
22
23
24 /*
25  *  defines the class and methods implemented within pushback.cpp
26  */
27
28 class pushBackBuffer
29 {
30  private:
31   char       *charStack;
32   int         stackPtr;   /* index to push back stack        */
33   int         debug;
34   int         verbose;
35   int         eofFound;
36   char       *fileName;
37   int         lineNo;
38   int         stdIn;
39
40  public:
41          pushBackBuffer (char *);
42   ~      pushBackBuffer ();
43   char   getPB          (void);
44   char   putPB          (char ch);
45   void   skipUntilToken (void);
46   void   skipToNewline  (void);
47   double readNumber     (void);
48   int    readInt        (void);
49   char  *readString     (void);
50   int    isString       (const char *string);
51 };
52
53