1    | /***************************************
2    |   $Header: /home/amb/CVS/cxref/src/parse-yy.h,v 1.13 2003-09-05 17:57:55 amb Exp $
3    | 
4    |   C Cross Referencing & Documentation tool. Version 1.5f.
5    | 
6    |   The function protypes that are missing from the lex and yacc output.
7    |   ******************/ /******************
8    |   Written by Andrew M. Bishop
9    | 
10   |   This file Copyright 1995,96,99,2002,03 Andrew M. Bishop
11   |   It may be distributed under the GNU Public License, version 2, or
12   |   any higher version.  See section COPYING of the GNU Public license
13   |   for conditions under which this file may be redistributed.
14   |   ***************************************/
15   | 
16   | #ifndef PARSE_YY_H
17   | #define PARSE_YY_H   /*+ To stop multiple inclusions. +*/
18   | 
19   | #include <stdio.h>
20   | #include <stdlib.h>
21   | 
22   | /*+ Debugging output or not?
23   | 
24   |   YYDEBUG=0 : No debugging at all, smaller, faster code.
25   | 
26   |   YYDEBUG=1 : Debugging output only when parsing fails.
27   | 
28   |   YYDEBUG=2 : Debugging output for each symbol from lex().
29   | 
30   |   YYDEBUG=3 : Full yacc debugging output, state transitions etc.
31   | +*/
32   | #define YYDEBUG 1
33   | 
34   | /* Only the #define for YYDEBUG above is user editable,
35   |    those below are for fixing up yacc/lex only. */
36   | 
37   | /*+ Some versions of yacc (Sun) don't allow YYSTYPE to be #defined as char* +*/
38   | typedef char* yystype;
39   | 
40   | /*+ Semantic type is a char* +*/
41   | #define YYSTYPE yystype
42   | 
43   | /*+ use prototypes in function declarations +*/
44   | #define YY_USE_PROTOS
45   | 
46   | /*+ the "const" storage-class-modifier is valid +*/
47   | #define YY_USE_CONST
48   | 
49   | #if YYDEBUG
50   | 
51   | /*+ Turn the debugging output on and off. +*/
52   | extern int yydebug;
53   | 
54   | /*+ Define verbose errors in Bison generated file +*/
55   | #define YYERROR_VERBOSE 1
56   | 
57   | /*+ This is needed in the Bison generated code. +*/
58   | #define xmalloc malloc
59   | 
60   | /*+ Print the semantic value +*/
61   | #define YYPRINT(file,type,value)  printf(" '%s'",value)
62   | 
63   | #endif
64   | 
65   | /* Extern variables */
66   | 
67   | /*+ The name of the current file. +*/
68   | extern char* parse_file;
69   | 
70   | /*+ The current line number in the file. +*/
71   | extern int parse_line;
72   | 
73   | /*+ For communication between the lex and yacc code. +*/
74   | extern YYSTYPE yylval;
75   | 
76   | /*+ The file that the lex code is to read from. +*/
77   | extern FILE *yyin;
78   | 
79   | /* Global functions */
80   | 
81   | int yylex(void);
82   | 
83   | int yyparse(void);
84   | void yyrestart (FILE *input_file);
85   | 
86   | /* yywrap() function */
87   | 
88   | #define YY_SKIP_YYWRAP 1 /* Don't use yywrap prototype */
89   | 
90   | #ifndef yywrap
91   | 
92   | /*+ Needed in lex but does nothing. +*/
93   | #define yywrap() 1
94   | 
95   | #endif
96   | 
97   | #endif