4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 * esclex.h -- public definitions for esclex module
28 * this module provides lexical analysis (i.e. tokenizing the
29 * input files) and the lex-level error routines expected by
30 * yacc like yyerror(). yylex() and yyerror() are called only
31 * by yacc-generated code. the lex_X() routines are called
34 * the tokstr struct is the communication mechanism between the lexer
38 #ifndef _ESC_COMMON_ESCLEX_H
39 #define _ESC_COMMON_ESCLEX_H
41 #pragma ident "%Z%%M% %I% %E% SMI"
47 /* information returned by lexer for tokens with string table entries */
49 const char *s
; /* the string (in the string table) */
50 const char *file
; /* file where this token appeared */
51 int line
; /* line where this token appeared */
54 void lex_init(char **av
, const char *cppargs
, int lexecho
);
57 const unsigned long long *lex_s2ullp_lut_lookup(struct lut
*root
,
60 /* lut containing "ident" strings */
63 /* lut containing "dictionary" strings */
66 /* lut containing valid timeval suffixes */
67 struct lut
*Timesuffixlut
;
69 /* flags set by #pragmas */
70 int Pragma_new_errors_only
;
71 int Pragma_trust_ereports
;
72 int Pragma_allow_cycles
;
74 /* exported by esclex.c but names are mandated by the way yacc works... */
76 void yyerror(const char *s
);
82 #endif /* _ESC_COMMON_ESCLEX_H */