%{
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <libintl.h>
#include <errno.h>
#include "iconv_tm.h"
#include "itmcomp.h"
#include "itm_util.h"
%}
%union yystacktype
{
int intval;
}
%%
{
itm_def_process($1);
}
;
{
$$ = NULL;
}
{
TRACE_MESSAGE('y',
("def_element_list: def_element_list def_element ;\n"));
$$ = NULL;
}
;
{
NULL, OBJ_REG_TAIL);
$$ = $1;
}
{
}
| map
{
if (NULL != $1) {
(void) obj_register(ITMC_OBJ_MAP,
NULL, OBJ_REG_TAIL);
}
$$ = $1;
}
{
NULL, OBJ_REG_TAIL);
$$ = $1;
}
;
{
$4, sizeof (itm_direc_t));
}
{
$3, sizeof (itm_direc_t));
}
;
{
}
{
"direction_unit_list direction_unit\n"));
}
;
{
}
{
}
{
}
{
}
{
}
{
}
;
{
$$.type = ITMC_OBJ_DIREC;
$$.tbl_hdr = $1;
}
| map
{
$$.type = ITMC_OBJ_MAP;
$$.tbl_hdr = $1;
}
{
$$.type = ITMC_OBJ_OP;
$$.tbl_hdr = $1;
}
;
{
$4, sizeof (itm_cond_t));
NULL, OBJ_REG_TAIL);
}
{
$3, sizeof (itm_cond_t));
NULL, OBJ_REG_TAIL);
}
;
{
}
{
"condition_list condition_expr;\n"));
}
;
{
$$ = NULL;
} else {
$$ = malloc_vital(sizeof (itmc_obj_t));
$$->type = ITMC_OBJ_RANGE;
}
}
| expr
{
$$ = malloc_vital(sizeof (itmc_obj_t));
$$->type = ITMC_OBJ_EXPR;
$1, sizeof (itm_expr_t),
}
{
$$ = NULL;
} else {
$$ = malloc_vital(sizeof (itmc_obj_t));
$$->type = ITMC_OBJ_ESCAPESEQ;
}
}
;
{
}
{
}
;
{
$$ = malloc_vital(sizeof (itmc_obj_t));
$$->type = ITMC_OBJ_RANGE;
} else {
}
}
;
: escseq
{
}
{
}
;
{
$$ = malloc_vital(sizeof (itmc_obj_t));
$$->type = ITMC_OBJ_ESCAPESEQ;
*escseq = *($1);
}
;
{
}
{
}
{
}
{
}
;
{
$$ = $1;
$$->resultlen = $3;
}
{
$$ = $1;
$$->resultlen = 0;
}
{
$$ = $3;
$$->resultlen = $1;
}
{
$$ = malloc_vital(sizeof (itmc_map_attr_t));
$$->resultlen = $1;
$$->hash_factor = 0;
}
;
{
$5));
$$ = malloc_vital(sizeof (itmc_map_attr_t));
$$->type = $3;
$$->hash_factor = $5;
}
{
$$ = malloc_vital(sizeof (itmc_map_attr_t));
$$->type = $3;
$$->hash_factor = 0;
}
;
{
}
;
{
$$ = $3;
}
;
: map_pair
{
}
{
}
;
{
$$ = malloc_vital(sizeof (itmc_map_t));
free($1);
free($2);
}
{
"HEXADECIMAL ELLIPSES HEXADECIMAL\n"));
$$ = malloc_vital(sizeof (itmc_map_t));
free($1);
free($3);
free($4);
}
{
$$ = malloc_vital(sizeof (itmc_map_t));
free($2);
}
{
$$ = malloc_vital(sizeof (itmc_map_t));
}
{
$$ = malloc_vital(sizeof (itmc_map_t));
free($1);
}
;
{
$4, sizeof (itm_op_t));
}
{
$3, sizeof (itm_op_t));
}
{
$4, sizeof (itm_op_t));
}
{
$4, sizeof (itm_op_t));
}
;
{
}
{
}
;
{
$$ = NULL;
}
{
}
{
}
{
} else {
}
}
{
}
{
} else {
}
}
{
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_SEQ:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
}
{
NULL, 0,
}
{
NULL, 0,
}
{
$$ = op_self(ITM_OP_INIT);
}
{
$$ = op_self(ITM_OP_RESET);
}
{
NULL, 0,
}
{
sizeof (itm_expr_t), NULL, 0);
NULL, 0,
}
{
$$ = $1;
}
{
$$ = op_self(ITM_OP_BREAK);
}
{
$$ = op_self(ITM_OP_RETURN);
}
{
}
{
}
{
}
;
{
$6, sizeof (itm_op_t));
$3, sizeof (itm_expr_t),
NULL, 0);
}
{
"if (expr) {op_list} else op_if_else\n"));
$6, sizeof (itm_op_t));
$9, sizeof (itm_op_t));
$$ = op_unit(ITM_OP_IF_ELSE,
$3, sizeof (itm_expr_t),
}
{
"if (expr) {op_list} else {op_list}\n"));
$6, sizeof (itm_op_t));
$10, sizeof (itm_op_t));
$$ = op_unit(ITM_OP_IF_ELSE,
$3, sizeof (itm_expr_t),
}
;
{
}
;
{
}
;
{
$$ = $2;
}
| name
{
}
{
}
| DECIMAL
{
}
{
} else {
}
}
{
$$ = expr_self_num(ITM_EXPR_OUT, 0);
}
{
}
| ITM_TRUE
{
}
{
$$ = expr_self_num(ITM_EXPR_FALSE, 0);
}
{
}
{
}
{
} else {
}
}
{
} else {
}
}
{
$$ = expr_self_num(ITM_EXPR_INT,
} else {
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
$1, $3);
break;
case ITM_EXPR_REG:
$1, $3);
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
$1, $3);
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
$1, $3);
break;
case ITM_EXPR_REG:
$1, $3);
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
$1, $3);
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
$1, $3);
break;
case ITM_EXPR_REG:
$1, $3);
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
$1, $3);
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
switch ($1->type) {
case ITM_EXPR_INT:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_REG:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
case ITM_EXPR_IN_VECTOR_D:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
$1, $3);
break;
default:
break;
}
break;
default:
switch ($3->type) {
case ITM_EXPR_INT:
break;
case ITM_EXPR_REG:
break;
case ITM_EXPR_IN_VECTOR_D:
break;
default:
break;
}
break;
}
}
{
}
{
}
{
}
;
%%