1104862Sru// -*- C -*-
2151497Sru/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
3104862Sru     Written by Gaius Mulley (gaius@glam.ac.uk).
4104862Sru
5104862SruThis file is part of groff.
6104862Sru
7104862Srugroff is free software; you can redistribute it and/or modify it under
8104862Sruthe terms of the GNU General Public License as published by the Free
9104862SruSoftware Foundation; either version 2, or (at your option) any later
10104862Sruversion.
11104862Sru
12104862Srugroff is distributed in the hope that it will be useful, but WITHOUT ANY
13104862SruWARRANTY; without even the implied warranty of MERCHANTABILITY or
14104862SruFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15104862Srufor more details.
16104862Sru
17104862SruYou should have received a copy of the GNU General Public License along
18104862Sruwith groff; see the file COPYING.  If not, write to the Free Software
19151497SruFoundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
20104862Sru
21104862Sru
22104862Sru#define eof              (char)-1
23104862Sru
24104862Sru
25104862Sru/*
26114402Sru *  defines the class and methods implemented within pushback.cpp
27104862Sru */
28104862Sru
29104862Sruclass pushBackBuffer
30104862Sru{
31104862Sru private:
32104862Sru  char       *charStack;
33104862Sru  int         stackPtr;   /* index to push back stack        */
34104862Sru  int         debug;
35104862Sru  int         verbose;
36104862Sru  int         eofFound;
37104862Sru  char       *fileName;
38104862Sru  int         lineNo;
39104862Sru  int         stdIn;
40104862Sru
41104862Sru public:
42151497Sru         pushBackBuffer (char *);
43151497Sru  ~      pushBackBuffer ();
44151497Sru  char   getPB          (void);
45151497Sru  char   putPB          (char ch);
46151497Sru  void   skipUntilToken (void);
47151497Sru  void   skipToNewline  (void);
48151497Sru  double readNumber     (void);
49151497Sru  int    readInt        (void);
50151497Sru  char  *readString     (void);
51151497Sru  int    isString       (const char *string);
52104862Sru};
53104862Sru
54104862Sru
55