mms_par_impl.h revision cee0fb94c0d4227de0a00efc162fb2739844b641
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __MMS_PAR_IMPL_H
#define __MMS_PAR_IMPL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <thread.h>
#include <synch.h>
#include <mms_sym.h>
#include <mms_parser.h>
typedef union {
char *str;
} mms_stype_t;
#define MMS_PW_MAX_LEVEL 20
#define MMS_PAR_REC_ERR_MAX 5
#define MMS_PAR_MAX_TOKEN 2000
if ((s) == NULL) { \
YYERROR; \
} \
mms_pwka->par_wka_cur_node = (s); \
if (mms_par_cmd_node == NULL) { \
mms_par_cmd_node = (s); \
} else { \
(s)); \
} \
}
#define MMS_PAR_ALLOC_LIST(s) { \
mms_par_node_t *node; \
YYERROR; \
} \
(s) = &node->pn_arglist; \
}
#define MMS_PAR_SET_FLAG(x) \
MMS_PAR_FLAG(x))
#define MMS_PAR_UNSET_FLAG(x) \
~MMS_PAR_FLAG(x))
#define MMS_PAR_CHK_FLAG(x) \
MMS_PAR_FLAG(x)) != 0 ? 1 : 0)
#define MMS_PAR_CHK_DUP(x) { \
if (MMS_PAR_CHK_FLAG(x)) { \
} else { \
MMS_PAR_SET_FLAG(x); \
} \
}
typedef struct mms_pw {
struct mms_par_node **par_wka_cmd_node;
struct mms_par_node *par_wka_cur_node;
int par_wka_line;
int par_wka_col;
int par_wka_err_count;
int par_wka_err_type;
int par_wka_err_col;
int par_wka_rec_err;
int par_wka_error; /* Set this before */
/* calling yyerror */
int par_wka_num_syms;
int par_wka_token_index;
char *par_wka_token[2];
char par_wka_parser[40];
} mms_pw_t;
#define MMS_PW_NOTREE 0x01
#define MMS_PW_ATTR 0x08
#define MMS_PW_EOF 0x10
#define MMS_PW_ERROR 0x20
mms_pw_t *
int *depend_symtab_initialized);
char *mms_par_char_to_xml_escape(char *src);
char *mms_par_xml_escape_to_char(char *src);
#ifdef __cplusplus
}
#endif
#endif /* __MMS_PAR_IMPL_H */