/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _DT_PARSER_H
#define _DT_PARSER_H
#ifndef VBOX
#pragma ident "%Z%%M% %I% %E% SMI"
#include <libctf.h>
#include <stdarg.h>
#include <stdio.h>
#else /* VBOX */
# include <stdio.h>
#endif /* VBOX */
#ifdef __cplusplus
extern "C" {
#endif
#include <dt_errtags.h>
#include <dt_ident.h>
#include <dt_decl.h>
#include <dt_xlator.h>
#include <dt_list.h>
typedef struct dt_node {
/*
* D compiler nodes, as is the usual style, contain a union of the
* different sub-elements required by the various kinds of nodes.
* These sub-elements are accessed using the macros defined below.
*/
union {
struct {
} _const;
struct {
} _nodes;
struct {
} _clause;
struct {
} _pdesc;
struct {
} _member;
struct {
} _xlator;
struct {
} _provider;
} dn_u;
} dt_node_t;
extern int dt_node_is_integer(const dt_node_t *);
extern int dt_node_is_float(const dt_node_t *);
extern int dt_node_is_scalar(const dt_node_t *);
extern int dt_node_is_arith(const dt_node_t *);
extern int dt_node_is_vfptr(const dt_node_t *);
extern int dt_node_is_dynamic(const dt_node_t *);
extern int dt_node_is_stack(const dt_node_t *);
extern int dt_node_is_symaddr(const dt_node_t *);
extern int dt_node_is_usymaddr(const dt_node_t *);
extern int dt_node_is_string(const dt_node_t *);
extern int dt_node_is_strcompat(const dt_node_t *);
extern int dt_node_is_pointer(const dt_node_t *);
extern int dt_node_is_void(const dt_node_t *);
ctf_file_t **, ctf_id_t *);
extern int dt_node_is_posconst(const dt_node_t *);
extern int dt_node_is_actfunc(const dt_node_t *);
extern dt_node_t *dt_node_string(char *);
extern dt_node_t *dt_node_ident(char *);
extern dt_node_t *dt_node_vatype(void);
extern dt_node_t *dt_node_decl(void);
extern dt_node_t *dt_node_pdesc_by_name(char *);
extern void dt_node_free(dt_node_t *);
extern void dt_node_list_free(dt_node_t **);
extern void dt_node_link_free(dt_node_t **);
extern void dt_node_diftype(dtrace_hdl_t *,
const dt_node_t *, dtrace_diftype_t *);
extern int dt_node_root(dt_node_t *);
struct dtrace_typeinfo; /* see <dtrace.h> */
#define IS_CHAR(e) \
#define IS_VOID(e) \
((e).cte_offset == 0 && (e).cte_bits == 0)
extern int dt_type_lookup(const char *, struct dtrace_typeinfo *);
extern int dt_type_pointer(struct dtrace_typeinfo *);
typedef enum {
} yystate_t;
extern void xyerror(dt_errtag_t, const char *, ...);
extern void xywarn(dt_errtag_t, const char *, ...);
extern void yyerror(const char *, ...);
extern void yywarn(const char *, ...);
extern void yylabel(const char *);
extern int yyparse(void);
extern int yyinput(void);
#ifdef __cplusplus
}
#endif
#endif /* _DT_PARSER_H */