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 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <mdb/mdb_argvec.h>
33 #include <mdb/mdb_nv.h>
34 #include <mdb/mdb_types.h>
35 #include <mdb/mdb_module.h>
44 extern void mdb_lex_debug(int);
45 extern void mdb_lex_reset(void);
47 extern void yyerror(const char *, ...);
48 extern void yyperror(const char *, ...);
49 extern void yydiscard(void);
51 extern int yyparse(void);
52 extern int yywrap(void);
58 void mdb_lex_state_save(struct mdb_lex_state
*);
59 void mdb_lex_state_restore(struct mdb_lex_state
*);
60 void mdb_lex_state_create(struct mdb_frame
*);
61 void mdb_lex_state_destroy(struct mdb_frame
*);
64 * The lex and yacc debugging code as generated uses printf and fprintf
65 * for debugging output. We redefine these to refer to our yyprintf
66 * and yyfprintf routines, which are wrappers around mdb_iob_vprintf.
69 #define printf (void) yyprintf
70 #define fprintf (void) yyfprintf
72 extern int yyprintf(const char *, ...);
73 extern int yyfprintf(FILE *, const char *, ...);
78 * Maximum depth we can have in our yacc state stack. The yacc default is 150,
79 * but this should be more than enough for our simple mdb expressions.
81 #define YYMAXDEPTH 100
83 * Maximum size of our lex yytext buffer.
93 #endif /* _MDB_LEX_H */