8158 Want named threads API
[unleashed.git] / usr / src / cmd / mdb / common / mdb / mdb_lex.h
bloba17d125e9502f4ef466e3b5bd49409c247072791
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _MDB_LEX_H
28 #define _MDB_LEX_H
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>
36 #include <stdio.h>
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
42 #ifdef _MDB
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);
55 struct mdb_lex_state;
56 struct mdb_frame;
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 *, ...);
75 extern int yylineno;
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.
85 #define YYLMAX BUFSIZ
87 #endif /* _MDB */
89 #ifdef __cplusplus
91 #endif
93 #endif /* _MDB_LEX_H */