5 * The contents of this file are subject to the terms of the
6 * Common Development and Distribution License, Version 1.0 only
7 * (the "License"). You may not use this file except in compliance
10 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 * or http://www.opensolaris.org/os/licensing.
12 * See the License for the specific language governing permissions
13 * and limitations under the License.
15 * When distributing Covered Code, include this CDDL HEADER in each
16 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 * If applicable, add the following below this CDDL HEADER, with the
18 * fields enclosed by brackets "[]" replaced with your own identifying
19 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1999 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #pragma ident "%Z%%M% %I% %E% SMI"
51 itm_tbl_hdr_t
*tbl_hdr
;
52 itm_direc_t
*direc_unit
;
59 itmc_map_attr_t
*map_attr
;
62 %type
<intval
> itm_def
63 %type
<obj
> def_element_list
64 %type
<tbl_hdr
> def_element
66 %type
<tbl_hdr
> direction
67 %type
<obj
> direction_unit_list
68 %type
<obj
> direction_unit
72 %type
<itmc_ref
> condition
73 %type
<obj
> condition_list
74 %type
<obj
> condition_expr
76 %type
<obj
> range_list
77 %type
<obj
> range_pair
79 %type
<obj
> escseq_list
83 %type
<map_list
> map_list
84 %type
<map_list
> map_pair
85 %type
<map_attr
> map_attribute
86 %type
<intval
> map_resultlen
87 %type
<map_attr
> map_type
88 %type
<name
> map_type_names
90 %type
<tbl_hdr
> operation
93 %type
<obj
> op_if_else
100 %token
<name
> ITMNAME
102 %token
<name
> MAPTYPE_NAME
103 %token
<data
> HEXADECIMAL
141 %token MAPTYPE_BINARY
162 %right NOT NEG UMINUS
167 : ITMNAME CBO def_element_list CBC
176 TRACE_MESSAGE
('y', ("def_element_list: def_element ;\n"));
179 | def_element_list def_element SC
182 ("def_element_list: def_element_list def_element ;\n"));
190 TRACE_MESSAGE
('y', ("def_element: direction\n"));
191 (void) obj_register
(ITMC_OBJ_DIREC
, (itm_data_t
*)($1->name.itm_ptr
),
198 TRACE_MESSAGE
('y', ("def_element: condition\n"));
199 $$
= (itm_tbl_hdr_t
*)($1->referencee
);
203 TRACE_MESSAGE
('y', ("def_element: map\n"));
205 (void) obj_register
(ITMC_OBJ_MAP
,
206 (itm_data_t
*)($1->name.itm_ptr
),
214 TRACE_MESSAGE
('y', ("def_element: operation\n"));
215 (void) obj_register
(ITMC_OBJ_OP
, (itm_data_t
*)($1->name.itm_ptr
),
223 : DIRECTION name CBO direction_unit_list CBC
225 TRACE_MESSAGE
('y', ("direction name (direction_unit_list)\n"));
226 $$
= obj_table
(ITM_TBL_DIREC
, $2,
227 $4, sizeof
(itm_direc_t
));
229 | DIRECTION CBO direction_unit_list CBC
231 TRACE_MESSAGE
('y', ("direction name (direction_unit_list)\n"));
232 $$
= obj_table
(ITM_TBL_DIREC
, NULL
,
233 $3, sizeof
(itm_direc_t
));
240 TRACE_MESSAGE
('y', ("direction_unit_list: direction_unit\n"));
241 $$
= obj_list_append
(NULL
, $1);
243 | direction_unit_list direction_unit
245 TRACE_MESSAGE
('y', ("direction_unit_list: "
246 "direction_unit_list direction_unit\n"));
247 $$
= obj_list_append
($1, $2);
252 : condition action SC
254 TRACE_MESSAGE
('y', ("direction_unit: condition action ;\n"));
255 $$
= direction_unit
($1, NULL
, &($2), NULL
);
260 TRACE_MESSAGE
('y', ("direction_unit: condition NAME ;\n"));
261 $$
= direction_unit
($1, NULL
, NULL
, $2);
266 TRACE_MESSAGE
('y', ("direction_unit: NAME action ;\n"));
267 $$
= direction_unit
(NULL
, $1, &($2), NULL
);
272 TRACE_MESSAGE
('y', ("direction_unit: NAME NAME ;\n"));
273 $$
= direction_unit
(NULL
, $1, NULL
, $2);
278 $$
= direction_unit
(NULL
, NULL
, &($2), NULL
);
283 TRACE_MESSAGE
('y', ("direction_unit: TRUE NAME ;\n"));
284 $$
= direction_unit
(NULL
, NULL
, NULL
, $2);
291 TRACE_MESSAGE
('y', ("action: direction\n"));
292 $$.type
= ITMC_OBJ_DIREC
;
297 TRACE_MESSAGE
('y', ("action: map\n"));
298 $$.type
= ITMC_OBJ_MAP
;
303 TRACE_MESSAGE
('y', ("action: operation\n"));
304 $$.type
= ITMC_OBJ_OP
;
310 : CONDITION name CBO condition_list CBC
312 itm_tbl_hdr_t
*tbl_hdr
;
313 TRACE_MESSAGE
('y', ("condition\n"));
314 tbl_hdr
= obj_table
(ITM_TBL_COND
, $2,
315 $4, sizeof
(itm_cond_t
));
316 $$
= obj_register
(ITMC_OBJ_COND
, $2,
317 tbl_hdr
, tbl_hdr
->size
,
320 | CONDITION CBO condition_list CBC
322 itm_tbl_hdr_t
*tbl_hdr
;
323 TRACE_MESSAGE
('y', ("condition\n"));
324 tbl_hdr
= obj_table
(ITM_TBL_COND
, NULL
,
325 $3, sizeof
(itm_cond_t
));
326 $$
= obj_register
(ITMC_OBJ_COND
, NULL
,
327 tbl_hdr
, tbl_hdr
->size
,
335 TRACE_MESSAGE
('y', ("condition_list: condition_expr;\n"));
336 $$
= obj_list_append
(NULL
, $1);
338 | condition_list condition_expr SC
340 TRACE_MESSAGE
('y', ("condition_list: "
341 "condition_list condition_expr;\n"));
342 $$
= obj_list_append
($1, $2);
349 itm_tbl_hdr_t
*range
;
351 TRACE_MESSAGE
('y', ("condition_expr: between\n"));
352 range
= range_table
(NULL
, $2);
356 $$
= malloc_vital
(sizeof
(itmc_obj_t
));
357 $$
->type
= ITMC_OBJ_RANGE
;
359 cond
= malloc_vital
(sizeof
(itm_cond_t
));
361 cond
->type
= ITM_COND_BETWEEN
;
362 cond
->operand.place.itm_ptr
= (itm_place2_t
)range
;
363 $$
->ref
[0] = obj_register
(ITMC_OBJ_RANGE
, NULL
,
365 &(cond
->operand.place
),
369 $$
->next
= $$
->last
= NULL
;
375 TRACE_MESSAGE
('y', ("condition_expr: expr\n"));
376 $$
= malloc_vital
(sizeof
(itmc_obj_t
));
377 $$
->type
= ITMC_OBJ_EXPR
;
379 cond
= malloc_vital
(sizeof
(itm_cond_t
));
381 cond
->type
= ITM_COND_EXPR
;
382 cond
->operand.place.itm_ptr
= (itm_place2_t
)($1);
383 $$
->ref
[0] = obj_register
(ITMC_OBJ_EXPR
, NULL
,
384 $1, sizeof
(itm_expr_t
),
385 &(cond
->operand.place
),
389 $$
->next
= $$
->last
= NULL
;
391 | ESCAPESEQ escseq_list
393 itm_tbl_hdr_t
*escseq
;
395 TRACE_MESSAGE
('y', ("condition_expr: escseq {escseq_list;}\n"));
396 escseq
= escseq_table
(NULL
, $2);
397 if
(escseq
== NULL
) {
400 $$
= malloc_vital
(sizeof
(itmc_obj_t
));
401 $$
->type
= ITMC_OBJ_ESCAPESEQ
;
403 cond
= malloc_vital
(sizeof
(itm_cond_t
));
405 cond
->type
= ITM_COND_ESCAPESEQ
;
406 cond
->operand.place.itm_ptr
= (itm_place2_t
)escseq
;
407 $$
->ref
[0] = obj_register
(ITMC_OBJ_ESCAPESEQ
, NULL
,
408 escseq
, escseq
->size
,
409 &(cond
->operand.place
),
413 $$
->next
= $$
->last
= NULL
;
421 TRACE_MESSAGE
('y', ("range_list: range_pair\n"));
422 $$
= obj_list_append
(NULL
, $1);
424 | range_list COMMA range_pair
426 TRACE_MESSAGE
('y', ("range_list: range_list, range_pair\n"));
427 $$
= obj_list_append
($1, $3);
432 : HEXADECIMAL ELLIPSES HEXADECIMAL
434 itmc_data_pair_t
*range
;
435 TRACE_MESSAGE
('y', ("range_pair: HEXADECIMAL...HEXADECIMAL\n"));
436 $$
= malloc_vital
(sizeof
(itmc_obj_t
));
437 $$
->type
= ITMC_OBJ_RANGE
;
439 range
= malloc_vital
(sizeof
(itmc_data_pair_t
));
441 if
(data_compare
($1, $3) < 0) {
442 range
->data0
= *($1);
443 range
->data1
= *($3);
445 range
->data0
= *($3);
446 range
->data1
= *($1);
453 TRACE_MESSAGE
('y', ("escseq_list: escseq\n"));
454 $$
= obj_list_append
(NULL
, $1);
456 | escseq_list COMMA escseq
458 TRACE_MESSAGE
('y', ("escseq_list: escseq_list; escseq\n"));
459 $$
= obj_list_append
($1, $3);
467 TRACE_MESSAGE
('y', ("escseq: HEXADECIMAL\n"));
468 $$
= malloc_vital
(sizeof
(itmc_obj_t
));
469 $$
->type
= ITMC_OBJ_ESCAPESEQ
;
471 escseq
= malloc_vital
(sizeof
(itm_data_t
));
477 map
: MAP name CBO map_list CBC
479 TRACE_MESSAGE
('y', ("map: map name {map_list}\n"));
480 $$
= map_table
($2, $4, NULL
);
482 | MAP CBO map_list CBC
484 TRACE_MESSAGE
('y', ("map: map {map_list}\n"));
485 $$
= map_table
(NULL
, $3, NULL
);
487 | MAP name map_attribute CBO map_list CBC
489 TRACE_MESSAGE
('y', ("map: map name attribute {map_list}\n"));
490 $$
= map_table
($2, $5, $3);
492 | MAP map_attribute CBO map_list CBC
494 TRACE_MESSAGE
('y', ("map: map attribute {map_list}\n"));
495 $$
= map_table
(NULL
, $4, $2);
500 :map_type COMMA map_resultlen
502 TRACE_MESSAGE
('y', ("map_attribute: map_type map_resultlen\n"));
508 TRACE_MESSAGE
('y', ("map_attribute: map_type\n"));
512 |map_resultlen COMMA map_type
514 TRACE_MESSAGE
('y', ("map_attribute: map_resultlen map_type\n"));
520 TRACE_MESSAGE
('y', ("map_attribute: map_resultlen\n"));
521 $$
= malloc_vital
(sizeof
(itmc_map_attr_t
));
529 : MAPTYPE ASSIGN map_type_names COLON DECIMAL
531 TRACE_MESSAGE
('y', ("map_type: maptype=type:factor(%d)\n",
533 $$
= malloc_vital
(sizeof
(itmc_map_attr_t
));
535 $$
->hash_factor
= $5;
537 | MAPTYPE ASSIGN map_type_names
539 TRACE_MESSAGE
('y', ("map_type: maptype=type\n"));
540 $$
= malloc_vital
(sizeof
(itmc_map_attr_t
));
549 TRACE_MESSAGE
('y', ("map_type_names: size=%*s\n",
550 yylval.data
->size
, NSPTR
(yylval.data
)));
557 : RESULTLEN ASSIGN DECIMAL
559 TRACE_MESSAGE
('y', ("map_resultlen(%d)\n", $3));
567 TRACE_MESSAGE
('y', ("map_list: map_pair\n"));
568 $$
= map_list_append
(NULL
, $1);
572 TRACE_MESSAGE
('y', ("map_list: map_list map_pair\n"));
573 $$
= map_list_append
($1, $2);
578 : HEXADECIMAL HEXADECIMAL
580 TRACE_MESSAGE
('y', ("map_pair: HEXADECIMAL HEXADECIMAL\n"));
581 $$
= malloc_vital
(sizeof
(itmc_map_t
));
582 $$
->data_pair.data0
= *($1);
584 $$
->data_pair.data1
= *($2);
587 | HEXADECIMAL ELLIPSES HEXADECIMAL HEXADECIMAL
589 TRACE_MESSAGE
('y', ("map_pair: "
590 "HEXADECIMAL ELLIPSES HEXADECIMAL\n"));
591 $$
= malloc_vital
(sizeof
(itmc_map_t
));
592 $$
->data_pair.data0
= *($1);
593 $$
->data_pair.range
= *($3);
596 $$
->data_pair.data1
= *($4);
599 | ITM_DEFAULT HEXADECIMAL
601 TRACE_MESSAGE
('y', ("map_pair: default HEXADECIMAL\n"));
602 $$
= malloc_vital
(sizeof
(itmc_map_t
));
603 $$
->data_pair.data0.size
= 0;
604 $$
->data_pair.data1
= *($2);
607 | ITM_DEFAULT ITM_IDENTICAL
609 TRACE_MESSAGE
('y', ("map_pair: default default\n"));
610 $$
= malloc_vital
(sizeof
(itmc_map_t
));
611 $$
->data_pair.data0.size
= 0;
612 $$
->data_pair.data1.size
= 0;
614 | HEXADECIMAL ERROR
/* NO RANGE */
616 TRACE_MESSAGE
('y', ("map_pair: hexadecimal error\n"));
617 $$
= malloc_vital
(sizeof
(itmc_map_t
));
618 $$
->data_pair.data0
= *($1);
620 $$
->data_pair.data1.size
= 0;
625 : OPERATION name CBO op_list CBC
627 TRACE_MESSAGE
('y', ("operation: operation name {op_list}\n"));
628 $$
= obj_table
(ITM_TBL_OP
, $2,
629 $4, sizeof
(itm_op_t
));
631 | OPERATION CBO op_list CBC
633 TRACE_MESSAGE
('y', ("operation: operation {op_list}\n"));
634 $$
= obj_table
(ITM_TBL_OP
, NULL
,
635 $3, sizeof
(itm_op_t
));
637 | OPERATION ITM_INIT CBO op_list CBC
639 TRACE_MESSAGE
('y', ("operation: operation init {op_list}\n"));
640 $$
= obj_table
(ITM_TBL_OP_INIT
, NULL
,
641 $4, sizeof
(itm_op_t
));
643 | OPERATION RESET CBO op_list CBC
645 TRACE_MESSAGE
('y', ("operation: operation reset {op_list}\n"));
646 $$
= obj_table
(ITM_TBL_OP_RESET
, NULL
,
647 $4, sizeof
(itm_op_t
));
653 TRACE_MESSAGE
('y', ("op_list: op_unit\n"));
654 $$
= obj_list_append
(NULL
, $1);
658 TRACE_MESSAGE
('y', ("op_list: op_list op_unit\n"));
659 $$
= obj_list_append
($1, $2);
665 TRACE_MESSAGE
('y', ("op_unit: / *null */;\n"));
670 TRACE_MESSAGE
('y', ("op_unit: expr;\n"));
671 $$
= op_unary
(ITM_OP_EXPR
, $1, sizeof
(itm_expr_t
));
675 TRACE_MESSAGE
('y', ("expr: error;\n"));
676 $$
= op_self_num
(ITM_OP_ERROR_D
, EINVAL
);
680 TRACE_MESSAGE
('y', ("expr: error;\n"));
681 if
(ITM_EXPR_INT
== $2->type
) {
682 $$
= op_self_num
(ITM_OP_ERROR_D
, $2->data.itm_exnum
);
684 $$
= op_unary
(ITM_OP_ERROR
, $2, sizeof
(itm_expr_t
));
689 TRACE_MESSAGE
('y', ("discard expr;\n"));
690 $$
= op_self_num
(ITM_OP_DISCARD_D
, 1);
694 TRACE_MESSAGE
('y', ("discard expr;\n"));
695 if
(ITM_EXPR_INT
== $2->type
) {
696 $$
= op_self_num
(ITM_OP_DISCARD_D
, $2->data.itm_exnum
);
698 $$
= op_unary
(ITM_OP_DISCARD
, $2, sizeof
(itm_expr_t
));
701 | ITM_OUT ASSIGN expr SC
703 TRACE_MESSAGE
('y', ("out = expr;\n"));
706 $$
= op_unary
(ITM_OP_OUT_D
, $3, sizeof
(itm_expr_t
));
709 $$
= op_unary
(ITM_OP_OUT_S
, $3, sizeof
(itm_expr_t
));
712 $$
= op_unary
(ITM_OP_OUT_R
, $3, sizeof
(itm_expr_t
));
714 case ITM_EXPR_IN_VECTOR_D
:
715 $$
= op_unary
(ITM_OP_OUT_INVD
, $3, sizeof
(itm_expr_t
));
718 $$
= op_unary
(ITM_OP_OUT
, $3, sizeof
(itm_expr_t
));
725 TRACE_MESSAGE
('y', ("direction NAME;\n"));
726 $$
= op_unit
(ITM_OP_DIRECTION
, NULL
, 0, NULL
, 0, NULL
, 0);
727 op
= (itm_op_t
*)($$
->obj
);
728 op
->data.operand
[0].itm_ptr
= (itm_place2_t
)($2);
729 $$
->ref
[0] = obj_register
(ITMC_OBJ_DIREC
, $2,
731 &(op
->data.operand
[0]), OBJ_REG_TAIL
);
736 TRACE_MESSAGE
('y', ("operation NAME;\n"));
737 $$
= op_unit
(ITM_OP_OPERATION
, NULL
, 0, NULL
, 0, NULL
, 0);
738 op
= (itm_op_t
*)($$
->obj
);
739 op
->data.operand
[0].itm_ptr
= (itm_place2_t
)($2);
740 $$
->ref
[0] = obj_register
(ITMC_OBJ_OP
, $2,
742 &(op
->data.operand
[0]), OBJ_REG_TAIL
);
744 | OPERATION ITM_INIT SC
747 TRACE_MESSAGE
('y', ("operation init;\n"));
748 $$
= op_self
(ITM_OP_INIT
);
753 TRACE_MESSAGE
('y', ("operation reset;\n"));
754 $$
= op_self
(ITM_OP_RESET
);
759 TRACE_MESSAGE
('y', ("map NAME;\n"));
760 $$
= op_unit
(ITM_OP_MAP
, NULL
, 0, NULL
, 0, NULL
, 0);
761 op
= (itm_op_t
*)($$
->obj
);
762 op
->data.operand
[0].itm_ptr
= (itm_place2_t
)($2);
763 $$
->ref
[0] = obj_register
(ITMC_OBJ_MAP
, $2,
765 &(op
->data.operand
[0]), OBJ_REG_TAIL
);
770 TRACE_MESSAGE
('y', ("map NAME expr;\n"));
771 $$
= op_unit
(ITM_OP_MAP
, NULL
, 0, $3,
772 sizeof
(itm_expr_t
), NULL
, 0);
773 op
= (itm_op_t
*)($$
->obj
);
774 op
->data.operand
[0].itm_ptr
= (itm_place2_t
)($2);
775 $$
->ref
[0] = obj_register
(ITMC_OBJ_MAP
, $2,
777 &(op
->data.operand
[0]), OBJ_REG_TAIL
);
781 TRACE_MESSAGE
('y', ("op_unit: op_if_else\n"));
786 TRACE_MESSAGE
('y', ("break;\n"));
787 $$
= op_self
(ITM_OP_BREAK
);
791 TRACE_MESSAGE
('y', ("return;\n"));
792 $$
= op_self
(ITM_OP_RETURN
);
796 TRACE_MESSAGE
('y', ("printchr expr;\n"));
797 $$
= op_unary
(ITM_OP_PRINTCHR
, $2, sizeof
(itm_expr_t
));
801 TRACE_MESSAGE
('y', ("printchr expr;\n"));
802 $$
= op_unary
(ITM_OP_PRINTHD
, $2, sizeof
(itm_expr_t
));
806 TRACE_MESSAGE
('y', ("printint expr;\n"));
807 $$
= op_unary
(ITM_OP_PRINTINT
, $2, sizeof
(itm_expr_t
));
812 : ITM_IF PO expr PC CBO op_list CBC
814 itm_tbl_hdr_t
*tbl_hdr
;
815 TRACE_MESSAGE
('y', ("op_if_else: if (expr) {op_list}\n"));
816 tbl_hdr
= obj_table
(ITM_TBL_OP
, NULL
,
817 $6, sizeof
(itm_op_t
));
818 $$
= op_unit
(ITM_OP_IF
,
819 $3, sizeof
(itm_expr_t
),
820 tbl_hdr
, tbl_hdr
->size
,
823 | ITM_IF PO expr PC CBO op_list CBC ITM_ELSE op_if_else
825 itm_tbl_hdr_t
*tbl_hdr1
;
826 itm_tbl_hdr_t
*tbl_hdr2
;
827 TRACE_MESSAGE
('y', ("op_if_else: "
828 "if (expr) {op_list} else op_if_else\n"));
829 tbl_hdr1
= obj_table
(ITM_TBL_OP
, NULL
,
830 $6, sizeof
(itm_op_t
));
831 tbl_hdr2
= obj_table
(ITM_TBL_OP
, NULL
,
832 $9, sizeof
(itm_op_t
));
833 $$
= op_unit
(ITM_OP_IF_ELSE
,
834 $3, sizeof
(itm_expr_t
),
835 tbl_hdr1
, tbl_hdr1
->size
,
836 tbl_hdr2
, tbl_hdr2
->size
);
838 | ITM_IF PO expr PC CBO op_list CBC ITM_ELSE CBO op_list CBC
840 itm_tbl_hdr_t
*tbl_hdr1
;
841 itm_tbl_hdr_t
*tbl_hdr2
;
842 TRACE_MESSAGE
('y', ("op_if_else: "
843 "if (expr) {op_list} else {op_list}\n"));
844 tbl_hdr1
= obj_table
(ITM_TBL_OP
, NULL
,
845 $6, sizeof
(itm_op_t
));
846 tbl_hdr2
= obj_table
(ITM_TBL_OP
, NULL
,
847 $10, sizeof
(itm_op_t
));
848 $$
= op_unit
(ITM_OP_IF_ELSE
,
849 $3, sizeof
(itm_expr_t
),
850 tbl_hdr1
, tbl_hdr1
->size
,
851 tbl_hdr2
, tbl_hdr2
->size
);
857 TRACE_MESSAGE
('y', ("name: size=%*s\n",
858 yylval.data
->size
, NSPTR
(yylval.data
)));
865 TRACE_MESSAGE
('y', ("in\n"));
866 $$
= expr_self
(ITM_EXPR_IN
, NULL
);
872 TRACE_MESSAGE
('y', ("expr: (expr)\n"));
877 TRACE_MESSAGE
('y', ("expr: NAME\n"));
878 $$
= expr_self
(ITM_EXPR_NAME
, $1);
882 TRACE_MESSAGE
('y', ("expr: HEXADECIMAL\n"));
883 $$
= expr_self
(ITM_EXPR_SEQ
, yylval.data
);
887 TRACE_MESSAGE
('y', ("expr: DECIMAL\n"));
888 $$
= expr_self_num
(ITM_EXPR_INT
, yylval.num
);
890 | itm_in SBO expr SBC
892 if
(ITM_EXPR_INT
== $3->type
) {
893 TRACE_MESSAGE
('y', ("expr: in[%ld]\n",
894 $3->data.itm_exnum
));
895 $$
= expr_self_num
(ITM_EXPR_IN_VECTOR_D
,
898 TRACE_MESSAGE
('y', ("expr: in[expr]\n"));
899 $$
= expr_unary
(ITM_EXPR_IN_VECTOR
, $3);
904 TRACE_MESSAGE
('y', ("expr: outsize\n"));
905 $$
= expr_self_num
(ITM_EXPR_OUT
, 0);
909 TRACE_MESSAGE
('y', ("expr: inputsize\n"));
910 $$
= expr_self_num
(ITM_EXPR_IN_VECTOR_D
, (size_t)-1);
914 TRACE_MESSAGE
('y', ("expr: true\n"));
915 $$
= expr_self_num
(ITM_EXPR_TRUE
, 1);
919 TRACE_MESSAGE
('y', ("expr: false\n"));
920 $$
= expr_self_num
(ITM_EXPR_FALSE
, 0);
924 TRACE_MESSAGE
('y', ("expr: in == expr\n"));
925 $$
= expr_unary
(ITM_EXPR_IN_EQ
, $3);
929 TRACE_MESSAGE
('y', ("expr: expr == in\n"));
930 $$
= expr_unary
(ITM_EXPR_IN_EQ
, $1);
934 TRACE_MESSAGE
('y', ("expr: ! expr\n"));
936 if
(ITM_EXPR_INT
== $2->type
) {
937 $$
= expr_self_num
(ITM_EXPR_INT
, !($2->data.itm_exnum
));
939 $$
= expr_unary
(ITM_EXPR_NOT
, $2);
944 TRACE_MESSAGE
('y', ("expr: ~ expr\n"));
945 if
(ITM_EXPR_INT
== $2->type
) {
946 $$
= expr_self_num
(ITM_EXPR_INT
, ~
($2->data.itm_exnum
));
948 $$
= expr_unary
(ITM_EXPR_NEG
, $2);
951 | MINUS expr %prec MUL
953 TRACE_MESSAGE
('y', ("expr: - expr\n"));
954 if
(ITM_EXPR_INT
== $2->type
) {
955 $$
= expr_self_num
(ITM_EXPR_INT
,
956 (-1) * ($2->data.itm_exnum
));
958 $$
= expr_unary
(ITM_EXPR_UMINUS
, $2);
963 TRACE_MESSAGE
('y', ("expr: expr + expr\n"));
964 $$
= expr_binary
(ITM_EXPR_PLUS
, $1, $3);
965 $1 = expr_seq_to_int
($1);
966 $3 = expr_seq_to_int
($3);
971 $$
= expr_binary2
(ITM_EXPR_PLUS_D_D
, $1, $3);
974 $$
= expr_binary2
(ITM_EXPR_PLUS_D_R
, $1, $3);
976 case ITM_EXPR_IN_VECTOR_D
:
977 $$
= expr_binary2
(ITM_EXPR_PLUS_D_INVD
, $1, $3);
980 $$
= expr_binary2
(ITM_EXPR_PLUS_D_E
, $1, $3);
987 $$
= expr_binary2
(ITM_EXPR_PLUS_R_D
, $1, $3);
990 $$
= expr_binary2
(ITM_EXPR_PLUS_R_R
, $1, $3);
992 case ITM_EXPR_IN_VECTOR_D
:
993 $$
= expr_binary2
(ITM_EXPR_PLUS_R_INVD
, $1, $3);
996 $$
= expr_binary2
(ITM_EXPR_PLUS_R_E
, $1, $3);
1000 case ITM_EXPR_IN_VECTOR_D
:
1003 $$
= expr_binary2
(ITM_EXPR_PLUS_INVD_D
, $1, $3);
1006 $$
= expr_binary2
(ITM_EXPR_PLUS_INVD_R
, $1, $3);
1008 case ITM_EXPR_IN_VECTOR_D
:
1009 $$
= expr_binary2
(ITM_EXPR_PLUS_INVD_INVD
,
1013 $$
= expr_binary2
(ITM_EXPR_PLUS_INVD_E
, $1, $3);
1020 $$
= expr_binary2
(ITM_EXPR_PLUS_E_D
, $1, $3);
1023 $$
= expr_binary2
(ITM_EXPR_PLUS_E_R
, $1, $3);
1025 case ITM_EXPR_IN_VECTOR_D
:
1026 $$
= expr_binary2
(ITM_EXPR_PLUS_E_INVD
, $1, $3);
1029 $$
= expr_binary2
(ITM_EXPR_PLUS
, $1, $3);
1037 TRACE_MESSAGE
('y', ("expr: expr - expr\n"));
1038 $$
= expr_binary
(ITM_EXPR_MINUS
, $1, $3);
1039 $1 = expr_seq_to_int
($1);
1040 $3 = expr_seq_to_int
($3);
1045 $$
= expr_binary2
(ITM_EXPR_MINUS_D_D
, $1, $3);
1048 $$
= expr_binary2
(ITM_EXPR_MINUS_D_R
, $1, $3);
1050 case ITM_EXPR_IN_VECTOR_D
:
1051 $$
= expr_binary2
(ITM_EXPR_MINUS_D_INVD
,
1055 $$
= expr_binary2
(ITM_EXPR_MINUS_D_E
, $1, $3);
1062 $$
= expr_binary2
(ITM_EXPR_MINUS_R_D
, $1, $3);
1065 $$
= expr_binary2
(ITM_EXPR_MINUS_R_R
, $1, $3);
1067 case ITM_EXPR_IN_VECTOR_D
:
1068 $$
= expr_binary2
(ITM_EXPR_MINUS_R_INVD
,
1072 $$
= expr_binary2
(ITM_EXPR_MINUS_R_E
, $1, $3);
1076 case ITM_EXPR_IN_VECTOR_D
:
1079 $$
= expr_binary2
(ITM_EXPR_MINUS_INVD_D
,
1083 $$
= expr_binary2
(ITM_EXPR_MINUS_INVD_R
,
1086 case ITM_EXPR_IN_VECTOR_D
:
1087 $$
= expr_binary2
(ITM_EXPR_MINUS_INVD_INVD
,
1091 $$
= expr_binary2
(ITM_EXPR_MINUS_INVD_E
,
1099 $$
= expr_binary2
(ITM_EXPR_MINUS_E_D
, $1, $3);
1102 $$
= expr_binary2
(ITM_EXPR_MINUS_E_R
, $1, $3);
1104 case ITM_EXPR_IN_VECTOR_D
:
1105 $$
= expr_binary2
(ITM_EXPR_MINUS_E_INVD
,
1109 $$
= expr_binary2
(ITM_EXPR_MINUS
, $1, $3);
1117 TRACE_MESSAGE
('y', ("expr: expr *expr\n"));
1118 $$
= expr_binary
(ITM_EXPR_MUL
, $1, $3);
1119 $1 = expr_seq_to_int
($1);
1120 $3 = expr_seq_to_int
($3);
1125 $$
= expr_binary2
(ITM_EXPR_MUL_D_D
, $1, $3);
1128 $$
= expr_binary2
(ITM_EXPR_MUL_D_R
, $1, $3);
1130 case ITM_EXPR_IN_VECTOR_D
:
1131 $$
= expr_binary2
(ITM_EXPR_MUL_D_INVD
, $1, $3);
1134 $$
= expr_binary2
(ITM_EXPR_MUL_D_E
, $1, $3);
1141 $$
= expr_binary2
(ITM_EXPR_MUL_R_D
, $1, $3);
1144 $$
= expr_binary2
(ITM_EXPR_MUL_R_R
, $1, $3);
1146 case ITM_EXPR_IN_VECTOR_D
:
1147 $$
= expr_binary2
(ITM_EXPR_MUL_R_INVD
, $1, $3);
1150 $$
= expr_binary2
(ITM_EXPR_MUL_R_E
, $1, $3);
1154 case ITM_EXPR_IN_VECTOR_D
:
1157 $$
= expr_binary2
(ITM_EXPR_MUL_INVD_D
, $1, $3);
1160 $$
= expr_binary2
(ITM_EXPR_MUL_INVD_R
, $1, $3);
1162 case ITM_EXPR_IN_VECTOR_D
:
1163 $$
= expr_binary2
(ITM_EXPR_MUL_INVD_INVD
,
1167 $$
= expr_binary2
(ITM_EXPR_MUL_INVD_E
, $1, $3);
1174 $$
= expr_binary2
(ITM_EXPR_MUL_E_D
, $1, $3);
1177 $$
= expr_binary2
(ITM_EXPR_MUL_E_R
, $1, $3);
1179 case ITM_EXPR_IN_VECTOR_D
:
1180 $$
= expr_binary2
(ITM_EXPR_MUL_E_INVD
, $1, $3);
1183 $$
= expr_binary2
(ITM_EXPR_MUL
, $1, $3);
1191 TRACE_MESSAGE
('y', ("expr: expr / expr\n"));
1192 $$
= expr_binary
(ITM_EXPR_DIV
, $1, $3);
1193 $1 = expr_seq_to_int
($1);
1194 $3 = expr_seq_to_int
($3);
1199 $$
= expr_binary2
(ITM_EXPR_DIV_D_D
, $1, $3);
1202 $$
= expr_binary2
(ITM_EXPR_DIV_D_R
, $1, $3);
1204 case ITM_EXPR_IN_VECTOR_D
:
1205 $$
= expr_binary2
(ITM_EXPR_DIV_D_INVD
, $1, $3);
1208 $$
= expr_binary2
(ITM_EXPR_DIV_D_E
, $1, $3);
1215 $$
= expr_binary2
(ITM_EXPR_DIV_R_D
, $1, $3);
1218 $$
= expr_binary2
(ITM_EXPR_DIV_R_R
, $1, $3);
1220 case ITM_EXPR_IN_VECTOR_D
:
1221 $$
= expr_binary2
(ITM_EXPR_DIV_R_INVD
, $1, $3);
1224 $$
= expr_binary2
(ITM_EXPR_DIV_R_E
, $1, $3);
1228 case ITM_EXPR_IN_VECTOR_D
:
1231 $$
= expr_binary2
(ITM_EXPR_DIV_INVD_D
, $1, $3);
1234 $$
= expr_binary2
(ITM_EXPR_DIV_INVD_R
, $1, $3);
1236 case ITM_EXPR_IN_VECTOR_D
:
1237 $$
= expr_binary2
(ITM_EXPR_DIV_INVD_INVD
,
1241 $$
= expr_binary2
(ITM_EXPR_DIV_INVD_E
, $1, $3);
1248 $$
= expr_binary2
(ITM_EXPR_DIV_E_D
, $1, $3);
1251 $$
= expr_binary2
(ITM_EXPR_DIV_E_R
, $1, $3);
1253 case ITM_EXPR_IN_VECTOR_D
:
1254 $$
= expr_binary2
(ITM_EXPR_DIV_E_INVD
, $1, $3);
1257 $$
= expr_binary2
(ITM_EXPR_DIV
, $1, $3);
1265 TRACE_MESSAGE
('y', ("expr: expr % expr\n"));
1266 $$
= expr_binary
(ITM_EXPR_MOD
, $1, $3);
1267 $1 = expr_seq_to_int
($1);
1268 $3 = expr_seq_to_int
($3);
1273 $$
= expr_binary2
(ITM_EXPR_MOD_D_D
, $1, $3);
1276 $$
= expr_binary2
(ITM_EXPR_MOD_D_R
, $1, $3);
1278 case ITM_EXPR_IN_VECTOR_D
:
1279 $$
= expr_binary2
(ITM_EXPR_MOD_D_INVD
, $1, $3);
1282 $$
= expr_binary2
(ITM_EXPR_MOD_D_E
, $1, $3);
1289 $$
= expr_binary2
(ITM_EXPR_MOD_R_D
, $1, $3);
1292 $$
= expr_binary2
(ITM_EXPR_MOD_R_R
, $1, $3);
1294 case ITM_EXPR_IN_VECTOR_D
:
1295 $$
= expr_binary2
(ITM_EXPR_MOD_R_INVD
, $1, $3);
1298 $$
= expr_binary2
(ITM_EXPR_MOD_R_E
, $1, $3);
1302 case ITM_EXPR_IN_VECTOR_D
:
1305 $$
= expr_binary2
(ITM_EXPR_MOD_INVD_D
, $1, $3);
1308 $$
= expr_binary2
(ITM_EXPR_MOD_INVD_R
, $1, $3);
1310 case ITM_EXPR_IN_VECTOR_D
:
1311 $$
= expr_binary2
(ITM_EXPR_MOD_INVD_INVD
,
1315 $$
= expr_binary2
(ITM_EXPR_MOD_INVD_E
, $1, $3);
1322 $$
= expr_binary2
(ITM_EXPR_MOD_E_D
, $1, $3);
1325 $$
= expr_binary2
(ITM_EXPR_MOD_E_R
, $1, $3);
1327 case ITM_EXPR_IN_VECTOR_D
:
1328 $$
= expr_binary2
(ITM_EXPR_MOD_E_INVD
, $1, $3);
1331 $$
= expr_binary2
(ITM_EXPR_MOD
, $1, $3);
1339 TRACE_MESSAGE
('y', ("expr: expr << expr\n"));
1340 $$
= expr_binary
(ITM_EXPR_SHIFT_L
, $1, $3);
1341 $1 = expr_seq_to_int
($1);
1342 $3 = expr_seq_to_int
($3);
1347 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_D_D
, $1, $3);
1350 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_D_R
, $1, $3);
1352 case ITM_EXPR_IN_VECTOR_D
:
1353 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_D_INVD
,
1357 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_D_E
, $1, $3);
1364 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_R_D
, $1, $3);
1367 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_R_R
, $1, $3);
1369 case ITM_EXPR_IN_VECTOR_D
:
1370 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_R_INVD
,
1374 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_R_E
, $1, $3);
1378 case ITM_EXPR_IN_VECTOR_D
:
1381 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_INVD_D
,
1385 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_INVD_R
,
1388 case ITM_EXPR_IN_VECTOR_D
:
1389 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_INVD_INVD
,
1393 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_INVD_E
,
1401 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_E_D
, $1, $3);
1404 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_E_R
, $1, $3);
1406 case ITM_EXPR_IN_VECTOR_D
:
1407 $$
= expr_binary2
(ITM_EXPR_SHIFT_L_E_INVD
,
1411 $$
= expr_binary2
(ITM_EXPR_SHIFT_L
, $1, $3);
1419 TRACE_MESSAGE
('y', ("expr: expr >> expr\n"));
1420 $$
= expr_binary
(ITM_EXPR_SHIFT_R
, $1, $3);
1421 $1 = expr_seq_to_int
($1);
1422 $3 = expr_seq_to_int
($3);
1427 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_D_D
, $1, $3);
1430 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_D_R
, $1, $3);
1432 case ITM_EXPR_IN_VECTOR_D
:
1433 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_D_INVD
,
1437 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_D_E
, $1, $3);
1444 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_R_D
, $1, $3);
1447 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_R_R
, $1, $3);
1449 case ITM_EXPR_IN_VECTOR_D
:
1450 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_R_INVD
,
1454 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_R_E
, $1, $3);
1458 case ITM_EXPR_IN_VECTOR_D
:
1461 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_INVD_D
,
1465 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_INVD_R
,
1468 case ITM_EXPR_IN_VECTOR_D
:
1469 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_INVD_INVD
,
1473 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_INVD_E
,
1481 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_E_D
, $1, $3);
1484 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_E_R
, $1, $3);
1486 case ITM_EXPR_IN_VECTOR_D
:
1487 $$
= expr_binary2
(ITM_EXPR_SHIFT_R_E_INVD
,
1491 $$
= expr_binary2
(ITM_EXPR_SHIFT_R
, $1, $3);
1499 TRACE_MESSAGE
('y', ("expr: expr | expr\n"));
1500 $$
= expr_binary
(ITM_EXPR_OR
, $1, $3);
1501 $1 = expr_seq_to_int
($1);
1502 $3 = expr_seq_to_int
($3);
1507 $$
= expr_binary2
(ITM_EXPR_OR_D_D
, $1, $3);
1510 $$
= expr_binary2
(ITM_EXPR_OR_D_R
, $1, $3);
1512 case ITM_EXPR_IN_VECTOR_D
:
1513 $$
= expr_binary2
(ITM_EXPR_OR_D_INVD
, $1, $3);
1516 $$
= expr_binary2
(ITM_EXPR_OR_D_E
, $1, $3);
1523 $$
= expr_binary2
(ITM_EXPR_OR_R_D
, $1, $3);
1526 $$
= expr_binary2
(ITM_EXPR_OR_R_R
, $1, $3);
1528 case ITM_EXPR_IN_VECTOR_D
:
1529 $$
= expr_binary2
(ITM_EXPR_OR_R_INVD
, $1, $3);
1532 $$
= expr_binary2
(ITM_EXPR_OR_R_E
, $1, $3);
1536 case ITM_EXPR_IN_VECTOR_D
:
1539 $$
= expr_binary2
(ITM_EXPR_OR_INVD_D
, $1, $3);
1542 $$
= expr_binary2
(ITM_EXPR_OR_INVD_R
, $1, $3);
1544 case ITM_EXPR_IN_VECTOR_D
:
1545 $$
= expr_binary2
(ITM_EXPR_OR_INVD_INVD
,
1549 $$
= expr_binary2
(ITM_EXPR_OR_INVD_E
, $1, $3);
1556 $$
= expr_binary2
(ITM_EXPR_OR_E_D
, $1, $3);
1559 $$
= expr_binary2
(ITM_EXPR_OR_E_R
, $1, $3);
1561 case ITM_EXPR_IN_VECTOR_D
:
1562 $$
= expr_binary2
(ITM_EXPR_OR_E_INVD
, $1, $3);
1565 $$
= expr_binary2
(ITM_EXPR_OR
, $1, $3);
1573 TRACE_MESSAGE
('y', ("expr: expr ^ expr\n"));
1574 $$
= expr_binary
(ITM_EXPR_XOR
, $1, $3);
1575 $1 = expr_seq_to_int
($1);
1576 $3 = expr_seq_to_int
($3);
1581 $$
= expr_binary2
(ITM_EXPR_XOR_D_D
, $1, $3);
1584 $$
= expr_binary2
(ITM_EXPR_XOR_D_R
, $1, $3);
1586 case ITM_EXPR_IN_VECTOR_D
:
1587 $$
= expr_binary2
(ITM_EXPR_XOR_D_INVD
, $1, $3);
1590 $$
= expr_binary2
(ITM_EXPR_XOR_D_E
, $1, $3);
1597 $$
= expr_binary2
(ITM_EXPR_XOR_R_D
, $1, $3);
1600 $$
= expr_binary2
(ITM_EXPR_XOR_R_R
, $1, $3);
1602 case ITM_EXPR_IN_VECTOR_D
:
1603 $$
= expr_binary2
(ITM_EXPR_XOR_R_INVD
, $1, $3);
1606 $$
= expr_binary2
(ITM_EXPR_XOR_R_E
, $1, $3);
1610 case ITM_EXPR_IN_VECTOR_D
:
1613 $$
= expr_binary2
(ITM_EXPR_XOR_INVD_D
, $1, $3);
1616 $$
= expr_binary2
(ITM_EXPR_XOR_INVD_R
, $1, $3);
1618 case ITM_EXPR_IN_VECTOR_D
:
1619 $$
= expr_binary2
(ITM_EXPR_XOR_INVD_INVD
,
1623 $$
= expr_binary2
(ITM_EXPR_XOR_INVD_E
, $1, $3);
1630 $$
= expr_binary2
(ITM_EXPR_XOR_E_D
, $1, $3);
1633 $$
= expr_binary2
(ITM_EXPR_XOR_E_R
, $1, $3);
1635 case ITM_EXPR_IN_VECTOR_D
:
1636 $$
= expr_binary2
(ITM_EXPR_XOR_E_INVD
, $1, $3);
1639 $$
= expr_binary2
(ITM_EXPR_XOR
, $1, $3);
1647 TRACE_MESSAGE
('y', ("expr: expr & expr\n"));
1648 $$
= expr_binary
(ITM_EXPR_AND
, $1, $3);
1649 $1 = expr_seq_to_int
($1);
1650 $3 = expr_seq_to_int
($3);
1655 $$
= expr_binary2
(ITM_EXPR_AND_D_D
, $1, $3);
1658 $$
= expr_binary2
(ITM_EXPR_AND_D_R
, $1, $3);
1660 case ITM_EXPR_IN_VECTOR_D
:
1661 $$
= expr_binary2
(ITM_EXPR_AND_D_INVD
, $1, $3);
1664 $$
= expr_binary2
(ITM_EXPR_AND_D_E
, $1, $3);
1671 $$
= expr_binary2
(ITM_EXPR_AND_R_D
, $1, $3);
1674 $$
= expr_binary2
(ITM_EXPR_AND_R_R
, $1, $3);
1676 case ITM_EXPR_IN_VECTOR_D
:
1677 $$
= expr_binary2
(ITM_EXPR_AND_R_INVD
, $1, $3);
1680 $$
= expr_binary2
(ITM_EXPR_AND_R_E
, $1, $3);
1684 case ITM_EXPR_IN_VECTOR_D
:
1687 $$
= expr_binary2
(ITM_EXPR_AND_INVD_D
, $1, $3);
1690 $$
= expr_binary2
(ITM_EXPR_AND_INVD_R
, $1, $3);
1692 case ITM_EXPR_IN_VECTOR_D
:
1693 $$
= expr_binary2
(ITM_EXPR_AND_INVD_INVD
,
1697 $$
= expr_binary2
(ITM_EXPR_AND_INVD_E
, $1, $3);
1704 $$
= expr_binary2
(ITM_EXPR_AND_E_D
, $1, $3);
1707 $$
= expr_binary2
(ITM_EXPR_AND_E_R
, $1, $3);
1709 case ITM_EXPR_IN_VECTOR_D
:
1710 $$
= expr_binary2
(ITM_EXPR_AND_E_INVD
, $1, $3);
1713 $$
= expr_binary2
(ITM_EXPR_AND
, $1, $3);
1721 TRACE_MESSAGE
('y', ("expr: expr == expr\n"));
1722 $$
= expr_binary
(ITM_EXPR_EQ
, $1, $3);
1723 $1 = expr_seq_to_int
($1);
1724 $3 = expr_seq_to_int
($3);
1729 $$
= expr_binary2
(ITM_EXPR_EQ_D_D
, $1, $3);
1732 $$
= expr_binary2
(ITM_EXPR_EQ_D_R
, $1, $3);
1734 case ITM_EXPR_IN_VECTOR_D
:
1735 $$
= expr_binary2
(ITM_EXPR_EQ_D_INVD
, $1, $3);
1738 $$
= expr_binary2
(ITM_EXPR_EQ_D_E
, $1, $3);
1745 $$
= expr_binary2
(ITM_EXPR_EQ_R_D
, $1, $3);
1748 $$
= expr_binary2
(ITM_EXPR_EQ_R_R
, $1, $3);
1750 case ITM_EXPR_IN_VECTOR_D
:
1751 $$
= expr_binary2
(ITM_EXPR_EQ_R_INVD
, $1, $3);
1754 $$
= expr_binary2
(ITM_EXPR_EQ_R_E
, $1, $3);
1758 case ITM_EXPR_IN_VECTOR_D
:
1761 $$
= expr_binary2
(ITM_EXPR_EQ_INVD_D
, $1, $3);
1764 $$
= expr_binary2
(ITM_EXPR_EQ_INVD_R
, $1, $3);
1766 case ITM_EXPR_IN_VECTOR_D
:
1767 $$
= expr_binary2
(ITM_EXPR_EQ_INVD_INVD
,
1771 $$
= expr_binary2
(ITM_EXPR_EQ_INVD_E
, $1, $3);
1778 $$
= expr_binary2
(ITM_EXPR_EQ_E_D
, $1, $3);
1781 $$
= expr_binary2
(ITM_EXPR_EQ_E_R
, $1, $3);
1783 case ITM_EXPR_IN_VECTOR_D
:
1784 $$
= expr_binary2
(ITM_EXPR_EQ_E_INVD
, $1, $3);
1787 $$
= expr_binary2
(ITM_EXPR_EQ
, $1, $3);
1795 TRACE_MESSAGE
('y', ("expr: expr != expr\n"));
1796 $$
= expr_binary
(ITM_EXPR_NE
, $1, $3);
1797 $1 = expr_seq_to_int
($1);
1798 $3 = expr_seq_to_int
($3);
1803 $$
= expr_binary2
(ITM_EXPR_NE_D_D
, $1, $3);
1806 $$
= expr_binary2
(ITM_EXPR_NE_D_R
, $1, $3);
1808 case ITM_EXPR_IN_VECTOR_D
:
1809 $$
= expr_binary2
(ITM_EXPR_NE_D_INVD
, $1, $3);
1812 $$
= expr_binary2
(ITM_EXPR_NE_D_E
, $1, $3);
1819 $$
= expr_binary2
(ITM_EXPR_NE_R_D
, $1, $3);
1822 $$
= expr_binary2
(ITM_EXPR_NE_R_R
, $1, $3);
1824 case ITM_EXPR_IN_VECTOR_D
:
1825 $$
= expr_binary2
(ITM_EXPR_NE_R_INVD
, $1, $3);
1828 $$
= expr_binary2
(ITM_EXPR_NE_R_E
, $1, $3);
1832 case ITM_EXPR_IN_VECTOR_D
:
1835 $$
= expr_binary2
(ITM_EXPR_NE_INVD_D
, $1, $3);
1838 $$
= expr_binary2
(ITM_EXPR_NE_INVD_R
, $1, $3);
1840 case ITM_EXPR_IN_VECTOR_D
:
1841 $$
= expr_binary2
(ITM_EXPR_NE_INVD_INVD
,
1845 $$
= expr_binary2
(ITM_EXPR_NE_INVD_E
, $1, $3);
1852 $$
= expr_binary2
(ITM_EXPR_NE_E_D
, $1, $3);
1855 $$
= expr_binary2
(ITM_EXPR_NE_E_R
, $1, $3);
1857 case ITM_EXPR_IN_VECTOR_D
:
1858 $$
= expr_binary2
(ITM_EXPR_NE_E_INVD
, $1, $3);
1861 $$
= expr_binary2
(ITM_EXPR_NE
, $1, $3);
1869 TRACE_MESSAGE
('y', ("expr: expr > expr\n"));
1870 $$
= expr_binary
(ITM_EXPR_GT
, $1, $3);
1871 $1 = expr_seq_to_int
($1);
1872 $3 = expr_seq_to_int
($3);
1877 $$
= expr_binary2
(ITM_EXPR_GT_D_D
, $1, $3);
1880 $$
= expr_binary2
(ITM_EXPR_GT_D_R
, $1, $3);
1882 case ITM_EXPR_IN_VECTOR_D
:
1883 $$
= expr_binary2
(ITM_EXPR_GT_D_INVD
, $1, $3);
1886 $$
= expr_binary2
(ITM_EXPR_GT_D_E
, $1, $3);
1893 $$
= expr_binary2
(ITM_EXPR_GT_R_D
, $1, $3);
1896 $$
= expr_binary2
(ITM_EXPR_GT_R_R
, $1, $3);
1898 case ITM_EXPR_IN_VECTOR_D
:
1899 $$
= expr_binary2
(ITM_EXPR_GT_R_INVD
, $1, $3);
1902 $$
= expr_binary2
(ITM_EXPR_GT_R_E
, $1, $3);
1906 case ITM_EXPR_IN_VECTOR_D
:
1909 $$
= expr_binary2
(ITM_EXPR_GT_INVD_D
, $1, $3);
1912 $$
= expr_binary2
(ITM_EXPR_GT_INVD_R
, $1, $3);
1914 case ITM_EXPR_IN_VECTOR_D
:
1915 $$
= expr_binary2
(ITM_EXPR_GT_INVD_INVD
,
1919 $$
= expr_binary2
(ITM_EXPR_GT_INVD_E
, $1, $3);
1926 $$
= expr_binary2
(ITM_EXPR_GT_E_D
, $1, $3);
1929 $$
= expr_binary2
(ITM_EXPR_GT_E_R
, $1, $3);
1931 case ITM_EXPR_IN_VECTOR_D
:
1932 $$
= expr_binary2
(ITM_EXPR_GT_E_INVD
, $1, $3);
1935 $$
= expr_binary2
(ITM_EXPR_GT
, $1, $3);
1943 TRACE_MESSAGE
('y', ("expr: expr >= expr\n"));
1944 $$
= expr_binary
(ITM_EXPR_GE
, $1, $3);
1945 $1 = expr_seq_to_int
($1);
1946 $3 = expr_seq_to_int
($3);
1951 $$
= expr_binary2
(ITM_EXPR_GE_D_D
, $1, $3);
1954 $$
= expr_binary2
(ITM_EXPR_GE_D_R
, $1, $3);
1956 case ITM_EXPR_IN_VECTOR_D
:
1957 $$
= expr_binary2
(ITM_EXPR_GE_D_INVD
, $1, $3);
1960 $$
= expr_binary2
(ITM_EXPR_GE_D_E
, $1, $3);
1967 $$
= expr_binary2
(ITM_EXPR_GE_R_D
, $1, $3);
1970 $$
= expr_binary2
(ITM_EXPR_GE_R_R
, $1, $3);
1972 case ITM_EXPR_IN_VECTOR_D
:
1973 $$
= expr_binary2
(ITM_EXPR_GE_R_INVD
, $1, $3);
1976 $$
= expr_binary2
(ITM_EXPR_GE_R_E
, $1, $3);
1980 case ITM_EXPR_IN_VECTOR_D
:
1983 $$
= expr_binary2
(ITM_EXPR_GE_INVD_D
, $1, $3);
1986 $$
= expr_binary2
(ITM_EXPR_GE_INVD_R
, $1, $3);
1988 case ITM_EXPR_IN_VECTOR_D
:
1989 $$
= expr_binary2
(ITM_EXPR_GE_INVD_INVD
,
1993 $$
= expr_binary2
(ITM_EXPR_GE_INVD_E
, $1, $3);
2000 $$
= expr_binary2
(ITM_EXPR_GE_E_D
, $1, $3);
2003 $$
= expr_binary2
(ITM_EXPR_GE_E_R
, $1, $3);
2005 case ITM_EXPR_IN_VECTOR_D
:
2006 $$
= expr_binary2
(ITM_EXPR_GE_E_INVD
, $1, $3);
2009 $$
= expr_binary2
(ITM_EXPR_GE
, $1, $3);
2017 TRACE_MESSAGE
('y', ("expr: expr < expr\n"));
2018 $$
= expr_binary
(ITM_EXPR_LT
, $1, $3);
2019 $1 = expr_seq_to_int
($1);
2020 $3 = expr_seq_to_int
($3);
2025 $$
= expr_binary2
(ITM_EXPR_LT_D_D
, $1, $3);
2028 $$
= expr_binary2
(ITM_EXPR_LT_D_R
, $1, $3);
2030 case ITM_EXPR_IN_VECTOR_D
:
2031 $$
= expr_binary2
(ITM_EXPR_LT_D_INVD
, $1, $3);
2034 $$
= expr_binary2
(ITM_EXPR_LT_D_E
, $1, $3);
2041 $$
= expr_binary2
(ITM_EXPR_LT_R_D
, $1, $3);
2044 $$
= expr_binary2
(ITM_EXPR_LT_R_R
, $1, $3);
2046 case ITM_EXPR_IN_VECTOR_D
:
2047 $$
= expr_binary2
(ITM_EXPR_LT_R_INVD
, $1, $3);
2050 $$
= expr_binary2
(ITM_EXPR_LT_R_E
, $1, $3);
2054 case ITM_EXPR_IN_VECTOR_D
:
2057 $$
= expr_binary2
(ITM_EXPR_LT_INVD_D
, $1, $3);
2060 $$
= expr_binary2
(ITM_EXPR_LT_INVD_R
, $1, $3);
2062 case ITM_EXPR_IN_VECTOR_D
:
2063 $$
= expr_binary2
(ITM_EXPR_LT_INVD_INVD
,
2067 $$
= expr_binary2
(ITM_EXPR_LT_INVD_E
, $1, $3);
2074 $$
= expr_binary2
(ITM_EXPR_LT_E_D
, $1, $3);
2077 $$
= expr_binary2
(ITM_EXPR_LT_E_R
, $1, $3);
2079 case ITM_EXPR_IN_VECTOR_D
:
2080 $$
= expr_binary2
(ITM_EXPR_LT_E_INVD
, $1, $3);
2083 $$
= expr_binary2
(ITM_EXPR_LT
, $1, $3);
2091 TRACE_MESSAGE
('y', ("expr: expr <= expr\n"));
2092 $$
= expr_binary
(ITM_EXPR_LE
, $1, $3);
2093 $1 = expr_seq_to_int
($1);
2094 $3 = expr_seq_to_int
($3);
2099 $$
= expr_binary2
(ITM_EXPR_LE_D_D
, $1, $3);
2102 $$
= expr_binary2
(ITM_EXPR_LE_D_R
, $1, $3);
2104 case ITM_EXPR_IN_VECTOR_D
:
2105 $$
= expr_binary2
(ITM_EXPR_LE_D_INVD
, $1, $3);
2108 $$
= expr_binary2
(ITM_EXPR_LE_D_E
, $1, $3);
2115 $$
= expr_binary2
(ITM_EXPR_LE_R_D
, $1, $3);
2118 $$
= expr_binary2
(ITM_EXPR_LE_R_R
, $1, $3);
2120 case ITM_EXPR_IN_VECTOR_D
:
2121 $$
= expr_binary2
(ITM_EXPR_LE_R_INVD
, $1, $3);
2124 $$
= expr_binary2
(ITM_EXPR_LE_R_E
, $1, $3);
2128 case ITM_EXPR_IN_VECTOR_D
:
2131 $$
= expr_binary2
(ITM_EXPR_LE_INVD_D
, $1, $3);
2134 $$
= expr_binary2
(ITM_EXPR_LE_INVD_R
, $1, $3);
2136 case ITM_EXPR_IN_VECTOR_D
:
2137 $$
= expr_binary2
(ITM_EXPR_LE_INVD_INVD
,
2141 $$
= expr_binary2
(ITM_EXPR_LE_INVD_E
, $1, $3);
2148 $$
= expr_binary2
(ITM_EXPR_LE_E_D
, $1, $3);
2151 $$
= expr_binary2
(ITM_EXPR_LE_E_R
, $1, $3);
2153 case ITM_EXPR_IN_VECTOR_D
:
2154 $$
= expr_binary2
(ITM_EXPR_LE_E_INVD
, $1, $3);
2157 $$
= expr_binary2
(ITM_EXPR_LE
, $1, $3);
2165 TRACE_MESSAGE
('y', ("expr: NAME = expr\n"));
2166 $$
= expr_assign
(ITM_EXPR_ASSIGN
, $1, $3);
2170 TRACE_MESSAGE
('y', ("expr: expr || expr\n"));
2171 $$
= expr_binary
(ITM_EXPR_LOR
, $1, $3);
2175 TRACE_MESSAGE
('y', ("expr: expr && expr\n"));
2176 $$
= expr_binary
(ITM_EXPR_LAND
, $1, $3);