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