modyfied to generate only one switchseg for each C_ routine

This commit is contained in:
ceriel 1988-10-31 15:21:47 +00:00
parent 0011c49d1e
commit 63f793aff3

View file

@ -55,7 +55,9 @@ char *to_change;
table : row* table : row*
; ;
row : C_INSTR { set_outfile( yytext); header( yytext);} row : C_INSTR { set_outfile( yytext); header( yytext);
set_segment(segment);
}
[ special | simple] { out( "}\n\n");} [ special | simple] { out( "}\n\n");}
| DEF_C_INSTR { init_defaults( yytext);} | DEF_C_INSTR { init_defaults( yytext);}
@ -73,7 +75,7 @@ special :
simple { out( "}\n");} simple { out( "}\n");}
; ;
simple : ARROW { set_segment( segment); save_output();} simple : ARROW { save_output();}
actionlist { back_patch();} actionlist { back_patch();}
; ;
@ -149,7 +151,8 @@ Daction : CALL { out( "%s", yytext);}
; ;
def_row : [ special | simple] { out( "}\n\n");} def_row : { set_segment(segment);}
[ special | simple] { out( "}\n\n");}
; ;
@ -163,7 +166,9 @@ c_table : c_row*
; ;
c_row : %if ( to_change && strcmp( yytext, to_change) == 0) c_row : %if ( to_change && strcmp( yytext, to_change) == 0)
C_INSTR { set_outfile( yytext); header( yytext);} C_INSTR { set_outfile( yytext); header( yytext);
set_segment(segment);
}
[ special | simple] { out( "}\n\n"); to_change = 0; } [ special | simple] { out( "}\n\n"); to_change = 0; }
| C_INSTR | C_INSTR