%{
/* Revision 2000/07/00  16:32:00  kjt
   changed YYMAXDEPTH to 512 */

# include "swbus.h"
# define YYMAXDEPTH      512
# define YYSTYPE         yystype
# define putgrn(n)       (void)ITadd(n, gl)
# define class(nt)       { cls= 0; xxc= nt-1;   \
               for (xc= 0; xc < nt; xc++, xxc--)    \
                             if (stpick(xc)->type != tNULL) \
                 cls += (1 << xxc);}
# define ndput(tp)   { stput(tp);   \
               if (gn != NULL){gn->value0=  \
                  (CLR_TYPE)IAT_IT_add(gl, grnl); \
                  gl->size= 0;} \
               gn= (sttype() == tNULL) ? NULL : sttop(); }
# define ndterm(tp, val) { stput (tp);  \
                       staclr (c_lexv, (CLR_TYPE)val.name); \
                       staclr (c_line, (CLR_TYPE)val.line);}

IT* gl;
TNODE*  gn;
int cls;
int xc;
int xxc;

%}

%token NOTHING 260

%start lbm


%%

I1opt                   :
	 /* empty */
	{ ndput (tNULL); }
	;

I1opt                   :
	 annotation_list
	;

I2opt                   :
	 /* empty */
	{ ndput (tNULL); }
	;

I2opt                   :
	 annotation_list
	;

lbm                     :
	 I1opt BUT_definition_list I2opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tlbm);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(1);
	}
	}
	;

I3repp                  :
	 BUT_definition
	;

I3repp                  :
	 I3repp BUT_definition
	{ if (errorcount == 0) stlrlink (); }
	;

BUT_definition_list     :
	 I3repp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tBUT_definition_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(2);
	}
	}
	;

BUT_definition          :
	 state
	{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(tBUT_definition);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(3);
	}
	}
	;

state                   :
	 let_exp
	{
	if (errorcount == 0)
	{
	 putgrn(4);
	}
	}
	;

state                   :
	 var_choice_exp
	{
	if (errorcount == 0)
	{
	 putgrn(5);
	}
	}
	;

state                   :
	 gate_choice_exp
	{
	if (errorcount == 0)
	{
	 putgrn(6);
	}
	}
	;

state                   :
	 par_exp_full_synch
	{
	if (errorcount == 0)
	{
	 putgrn(7);
	}
	}
	;

state                   :
	 par_exp_inter
	{
	if (errorcount == 0)
	{
	 putgrn(8);
	}
	}
	;

state                   :
	 par_exp_expli
	{
	if (errorcount == 0)
	{
	 putgrn(9);
	}
	}
	;

state                   :
	 hiding_exp
	{
	if (errorcount == 0)
	{
	 putgrn(10);
	}
	}
	;

state                   :
	 enable_exp
	{
	if (errorcount == 0)
	{
	 putgrn(11);
	}
	}
	;

state                   :
	 disable_exp
	{
	if (errorcount == 0)
	{
	 putgrn(12);
	}
	}
	;

state                   :
	 parallel_full_synch
	{
	if (errorcount == 0)
	{
	 putgrn(13);
	}
	}
	;

state                   :
	 parallel_interleaving
	{
	if (errorcount == 0)
	{
	 putgrn(14);
	}
	}
	;

state                   :
	 parallel_explicit
	{
	if (errorcount == 0)
	{
	 putgrn(15);
	}
	}
	;

state                   :
	 choice_exp
	{
	if (errorcount == 0)
	{
	 putgrn(16);
	}
	}
	;

state                   :
	 guard_exp
	{
	if (errorcount == 0)
	{
	 putgrn(17);
	}
	}
	;

state                   :
	 external_offer
	{
	if (errorcount == 0)
	{
	 putgrn(18);
	}
	}
	;

state                   :
	 internal_action
	{
	if (errorcount == 0)
	{
	 putgrn(19);
	}
	}
	;

state                   :
	 stop_exp
	{
	if (errorcount == 0)
	{
	 putgrn(20);
	}
	}
	;

state                   :
	 exit_exp
	{
	if (errorcount == 0)
	{
	 putgrn(21);
	}
	}
	;

state                   :
	 BUT_instantiation
	{
	if (errorcount == 0)
	{
	 putgrn(22);
	}
	}
	;

state                   :
	 relabel
	{
	if (errorcount == 0)
	{
	 putgrn(23);
	}
	}
	;

state                   :
	 call
	{
	if (errorcount == 0)
	{
	 putgrn(24);
	}
	}
	;

I4opt                   :
	 /* empty */
	{ ndput (tNULL); }
	;

I4opt                   :
	 annotation_list
	;

let_exp                 :
	 ident_equation_list state I4opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tlet_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(25);
	}
	}
	;

I5opt                   :
	 /* empty */
	{ ndput (tNULL); }
	;

I5opt                   :
	 annotation_list
	;

var_choice_exp          :
	 var_domain_list state I5opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tvar_choice_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(26);
	}
	}
	;

I6opt                   :
	 /* empty */
	{ ndput (tNULL); }
	;

I6opt                   :
	 annotation_list
	;

gate_choice_exp         :
	 gate_domain_list state I6opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tgate_choice_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(27);
	}
	}
	;

I7opt                   :
	 /* empty */
	{ ndput (tNULL); }
	;

I7opt                   :
	 annotation_list
	;

par_exp_full_synch      :
	 gate_domain_list state I7opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tpar_exp_full_synch);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(28);
	}
	}
	;

I8opt                   :
	 /* empty */
	{ ndput (tNULL); }
	;

I8opt                   :
	 annotation_list
	;

par_exp_inter           :
	 gate_domain_list state I8opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tpar_exp_inter);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(29);
	}
	}
	;

I9opt                   :
	 /* empty */
	{ ndput (tNULL); }
	;

I9opt                   :
	 annotation_list
	;

par_exp_expli           :
	 gate_domain_list state I9opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tpar_exp_expli);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(30);
	}
	}
	;

I10opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I10opt                  :
	 annotation_list
	;

hiding_exp              :
	 state I10opt
	{
	if (errorcount == 0)
	{
	 class(2);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(thiding_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(31);
	}
	}
	;

I11opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I11opt                  :
	 annotation_list
	;

enable_exp              :
	 state state I11opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tenable_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(32);
	}
	}
	;

I12opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I12opt                  :
	 annotation_list
	;

disable_exp             :
	 state state I12opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tdisable_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(33);
	}
	}
	;

I13opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I13opt                  :
	 annotation_list
	;

parallel_full_synch     :
	 state state I13opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tparallel_full_synch);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(34);
	}
	}
	;

I14opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I14opt                  :
	 annotation_list
	;

parallel_interleaving   :
	 state state I14opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tparallel_interleaving);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(35);
	}
	}
	;

I15opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I15opt                  :
	 annotation_list
	;

parallel_explicit       :
	 state state I15opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tparallel_explicit);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(36);
	}
	}
	;

I16opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I16opt                  :
	 annotation_list
	;

choice_exp              :
	 state state I16opt
	{
	if (errorcount == 0)
	{
	 class(3);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tchoice_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(37);
	}
	}
	;

I17opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I17opt                  :
	 annotation_list
	;

guard_exp               :
	 value_exp value_exp state I17opt
	{
	if (errorcount == 0)
	{
	 class(4);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tguard_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(38);
	}
	}
	;

I18opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I18opt                  :
	 experiment_list
	;

I19opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I19opt                  :
	 predicate
	;

I20opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I20opt                  :
	 annotation_list
	;

external_offer          :
	 I18opt I19opt state I20opt
	{
	if (errorcount == 0)
	{
	 class(4);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(texternal_offer);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(39);
	}
	}
	;

I21opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I21opt                  :
	 annotation_list
	;

internal_action         :
	 state I21opt
	{
	if (errorcount == 0)
	{
	 class(2);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tinternal_action);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(40);
	}
	}
	;

I22opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I22opt                  :
	 annotation_list
	;

stop_exp                :
	 I22opt
	{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(tstop_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(41);
	}
	}
	;

I23opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I23opt                  :
	 exit_offer_list
	;

I24opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I24opt                  :
	 annotation_list
	;

exit_exp                :
	 I23opt I24opt
	{
	if (errorcount == 0)
	{
	 class(2);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(texit_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(42);
	}
	}
	;

I25opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I25opt                  :
	 value_exp_list
	;

I26opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I26opt                  :
	 annotation_list
	;

BUT_instantiation       :
	 I25opt I26opt
	{
	if (errorcount == 0)
	{
	 class(2);
	 if (sttype() == tNULL) stpop();
	 else if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	 ndput(tBUT_instantiation);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(43);
	}
	}
	;

relabel                 :
	 state
	{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(trelabel);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(44);
	}
	}
	;

call                    :
	 NOTHING
	{
	if (errorcount == 0)
	{
	 ndput(tcall);
	 staclr (c_lexv, (CLR_TYPE)$1.name);
	 staclr (c_line, (CLR_TYPE)$1.line);
	 putgrn(45);
	}
	}
	;

I27repp                 :
	 var_id
	;

I27repp                 :
	 I27repp var_id
	{ if (errorcount == 0) stlrlink (); }
	;

var_domain_list         :
	 I27repp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tvar_domain_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(46);
	}
	}
	;

I28repp                 :
	 gate_domain
	;

I28repp                 :
	 I28repp gate_domain
	{ if (errorcount == 0) stlrlink (); }
	;

gate_domain_list        :
	 I28repp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tgate_domain_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(47);
	}
	}
	;

gate_domain             :
	 NOTHING
	{
	if (errorcount == 0)
	{
	 ndput(tgate_domain);
	 staclr (c_lexv, (CLR_TYPE)$1.name);
	 staclr (c_line, (CLR_TYPE)$1.line);
	 putgrn(48);
	}
	}
	;

predicate               :
	 value_exp value_exp
	{
	if (errorcount == 0)
	{
	 class(2);
	 stlrlink ();
	 ndput(tpredicate);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(49);
	}
	}
	;

I29repp                 :
	 ident_equation
	;

I29repp                 :
	 I29repp ident_equation
	{ if (errorcount == 0) stlrlink (); }
	;

ident_equation_list     :
	 I29repp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tident_equation_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(50);
	}
	}
	;

ident_equation          :
	 value_exp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tident_equation);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(51);
	}
	}
	;

I30repp                 :
	 experiment
	;

I30repp                 :
	 I30repp experiment
	{ if (errorcount == 0) stlrlink (); }
	;

experiment_list         :
	 I30repp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(texperiment_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(52);
	}
	}
	;

experiment              :
	 var_id
	{
	if (errorcount == 0)
	{
	 putgrn(53);
	}
	}
	;

experiment              :
	 value_exp
	{
	if (errorcount == 0)
	{
	 putgrn(54);
	}
	}
	;

I31opt                  :
	 /* empty */
	{ ndput (tNULL); }
	;

I31opt                  :
	 annotation_list
	;

var_id                  :
	 I31opt
	{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(tvar_id);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(55);
	}
	}
	;

I32repp                 :
	 value_exp
	;

I32repp                 :
	 I32repp value_exp
	{ if (errorcount == 0) stlrlink (); }
	;

value_exp_list          :
	 I32repp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tvalue_exp_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(56);
	}
	}
	;

I33repa                 :
	 /* empty */
	{ ndput(tNULL); }
	;

I33repa                 :
	 I33repa value_exp
	{
	if (errorcount == 0)
	{
	 if (stpick(1)->type == tNULL) {stswap(); stpop();}
	 else stlrlink();
	}
	}
	;

value_exp               :
	 I33repa
	{
	if (errorcount == 0)
	{
	 if (sttype() == tNULL){
		class(0);
		stpop();
	 }
	 else class(1);
	 ndput(tvalue_exp);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (cls == 1) stsflink ();
	 putgrn(57);
	}
	}
	;

I34repp                 :
	 annotation
	;

I34repp                 :
	 I34repp annotation
	{ if (errorcount == 0) stlrlink (); }
	;

annotation_list         :
	 I34repp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(tannotation_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(58);
	}
	}
	;

annotation              :
	 NOTHING
	{
	if (errorcount == 0)
	{
	 ndput(tannotation);
	 staclr (c_lexv, (CLR_TYPE)$1.name);
	 staclr (c_line, (CLR_TYPE)$1.line);
	 putgrn(59);
	}
	}
	;

I35repp                 :
	 exit_ent
	;

I35repp                 :
	 I35repp exit_ent
	{ if (errorcount == 0) stlrlink (); }
	;

exit_offer_list         :
	 I35repp
	{
	if (errorcount == 0)
	{
	 class(1);
	 ndput(texit_offer_list);
	 sttop()->value1= (CLR_TYPE)cls;
	 if (stpick(1)->type == tNULL)
	      {stswap(); stpop();}
	 else stsflink ();
	 putgrn(60);
	}
	}
	;

exit_ent                :
	 value_exp
	{
	if (errorcount == 0)
	{
	 putgrn(61);
	}
	}
	;

exit_ent                :
	 sort_id
	{
	if (errorcount == 0)
	{
	 putgrn(62);
	}
	}
	;

sort_id                 :
	 NOTHING
	{
	if (errorcount == 0)
	{
	 ndput(tsort_id);
	 staclr (c_lexv, (CLR_TYPE)$1.name);
	 staclr (c_line, (CLR_TYPE)$1.line);
	 putgrn(63);
	}
	}
	;

%%

PRIVATE int
yylex ()
{
    token *tk;

   tk = gtk ();
   yylval = tk->yylval;
   return tk->type;
}

PUBLIC TNODE*
bast ()
{
   gl= ITcreate (4, 2, 1);
   gn= NULL;
   (void)yyparse();
   if (gn != NULL) gn->value0= (CLR_TYPE)IAT_IT_add(gl, grnl);
   return sttop();
}
