Add gperf 3.0.1.
[dragonfly.git] / contrib / gperf-3.0.1 / src / input.h
blob5d51ab61109e8d2f56b251a47163d7f5d96029ad
1 /* This may look like C code, but it is really -*- C++ -*- */
3 /* Input routines.
5 Copyright (C) 1989-1998, 2002-2003 Free Software Foundation, Inc.
6 Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
7 and Bruno Haible <bruno@clisp.org>.
9 This file is part of GNU GPERF.
11 GNU GPERF is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
14 any later version.
16 GNU GPERF is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; see the file COPYING.
23 If not, write to the Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26 #ifndef input_h
27 #define input_h 1
29 #include <stdio.h>
30 #include "keyword-list.h"
32 class Input
34 public:
35 Input (FILE *stream, Keyword_Factory *keyword_factory);
36 ~Input ();
37 void read_input ();
38 private:
39 /* Input stream. */
40 FILE * _stream;
41 /* Creates the keywords. */
42 Keyword_Factory * const _factory;
43 public:
44 /* Memory block containing the entire input. */
45 char * _input;
46 char * _input_end;
47 /* The C code from the declarations section. */
48 const char * _verbatim_declarations;
49 const char * _verbatim_declarations_end;
50 unsigned int _verbatim_declarations_lineno;
51 /* The C code from the end of the file. */
52 const char * _verbatim_code;
53 const char * _verbatim_code_end;
54 unsigned int _verbatim_code_lineno;
55 /* Declaration of struct type for a keyword and its attributes. */
56 const char * _struct_decl;
57 unsigned int _struct_decl_lineno;
58 /* Return type of the lookup function. */
59 const char * _return_type;
60 /* Shorthand for user-defined struct tag type. */
61 const char * _struct_tag;
62 /* List of all keywords. */
63 Keyword_List * _head;
64 /* Whether the keyword chars would have different values in a different
65 character set. */
66 bool _charset_dependent;
69 #endif