1 /*===========================================================================
2 Copyright (c) 2001, The Santa Cruz Operation
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
8 *Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
11 *Redistributions in binary form must reproduce the above copyright notice,
12 this list of conditions and the following disclaimer in the documentation
13 and/or other materials provided with the distribution.
15 *Neither name of The Santa Cruz Operation nor the names of its contributors
16 may be used to endorse or promote products derived from this software
17 without specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
20 IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
31 =========================================================================*/
33 /* $Id: scanner.h,v 1.5 2009/08/28 14:28:27 nhorman Exp $ */
36 #ifndef CSCOPE_SCANNER_H
37 #define CSCOPE_SCANNER_H
42 #define YYLMAX STMTMAX + PATLEN + 1 /* scanner line buffer size */
44 /* cross-reference database mark characters (when new ones are added,
45 * update the cscope.out format description in cscope.1)
62 /* other scanner token types */
68 /* scanner.l global data */
69 extern int first; /* buffer index for first char of symbol */
70 extern int last; /* buffer index for last char of symbol */
71 extern int lineno; /* symbol line number */
72 extern FILE *yyin; /* input file descriptor */
73 extern FILE *yyout; /* output file */
74 extern int myylineno; /* input line number */
77 /* HBB 20010430: if lex is used instead of flex, have to simulate the
78 * private copies of yytext and yytext for the world outside scanner.l: */
79 /* FIXME: there should be a feature test for this! */
80 #if defined(__OSF1__) || defined(__sun) || defined(_AIX)
83 extern unsigned char yytext[];
86 # define my_yytext yytext
87 # define my_yyleng yyleng
89 extern char *my_yytext; /* private copy of input line */
90 extern size_t my_yyleng; /* ... and current length of it */
93 /* The master function exported by scanner.l */
95 void initscanner(char *srcfile);
97 #endif /* CSCOPE_SCANNER_H ends */