From: ceriel Date: Thu, 26 Jan 1989 14:43:09 +0000 (+0000) Subject: cleaned up a bit X-Git-Tag: release-5-5~2662 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7f0b775587cb2dd585685c974b62c3304ee239be;p=ack.git cleaned up a bit --- diff --git a/util/ceg/EM_parser/common/Makefile b/util/ceg/EM_parser/common/Makefile index 38ce89a84..cdfef6b53 100644 --- a/util/ceg/EM_parser/common/Makefile +++ b/util/ceg/EM_parser/common/Makefile @@ -9,9 +9,7 @@ OFILES = pars.o Lpars.o scan.o mylex.o default.o C_instr2.o help.o eval.o\ action.o IFILES = -I$(EM)/h -I$(EM)/modules/h CC = cc - -.c.o : - $(CC) $(IFILES) -c $< +CFLAGS = $(IFILES) all : dummy $(OFILES) diff --git a/util/ceg/EM_parser/common/action.c b/util/ceg/EM_parser/common/action.c index 59581a9c7..c13617470 100644 --- a/util/ceg/EM_parser/common/action.c +++ b/util/ceg/EM_parser/common/action.c @@ -12,7 +12,7 @@ char **as_instructions; /* The buffer(?) where the instructions are saved */ int quantum = 0, /* Max. nr. of instructions in as_instructions[] */ nr_instr, /* Number of saved instructions */ first_action, /* Is this block of assembler-instr. the first after - * a '==>' or '::=' ? + * a '==>'? */ last_action; /* Is this block followed by a '.' ? */ diff --git a/util/ceg/EM_parser/common/mylex.c b/util/ceg/EM_parser/common/mylex.c index 667737362..bd09b4038 100644 --- a/util/ceg/EM_parser/common/mylex.c +++ b/util/ceg/EM_parser/common/mylex.c @@ -9,7 +9,6 @@ * DEF_C_INSTR - 'C_loe..', 'C_ste..', '..icon, '..fcon', etc * CONDITION - C-expression, for example: '$1 == 481' * ARROW - '==>' - * EQUIV - '::=' * CALL - C-style functioncall, for example: 'error( 17)' * ASSEM_INSTR - C-style string, for example: '"mov r0, (r1)"' * DEFAULT - 'default' @@ -82,13 +81,6 @@ int mylex() } break; - case ':' : if ( equiv()) { - CD_pos = FALSE; - CALL_pos = TRUE; - return( EQUIV); - } - break; - case 'd' : if ( CD_pos && _default()) { CD_pos = FALSE; special = FALSE; @@ -194,18 +186,6 @@ int arrow() /* '==>' */ return( FALSE); } -int equiv() /* '::=' */ -{ - if ( ( *next++ = scanc()) == ':') - if ( ( *next++ = scanc()) == '=') - return( TRUE); - else - backc( *--next); - else - backc( *--next); - return( FALSE); -} - int _default() /* 'default' */ { char c, skip_space(); @@ -266,7 +246,7 @@ read_call() read_condition() -/* A CONDITION is followed by either '==>' or '::='. +/* A CONDITION is followed by '==>' */ { while ( TRUE) { @@ -281,15 +261,6 @@ read_condition() return; } break; - - case ':' : if ( equiv()) { - backc( '='); - backc( ':'); - backc( ':'); - next -= 3; - return; - } - break; } } } @@ -299,12 +270,6 @@ char *str; { if ( *str == 'C' && *(str+1) == '_') /* C_xxx */ return( TRUE); - else if ( strncmp( "locals", str, 6) == 0) - return( TRUE); - else if ( strncmp( "jump", str, 4) == 0) - return( TRUE); - else if ( strncmp( "prolog", str, 6) == 0) - return( TRUE); else return( FALSE); } diff --git a/util/ceg/EM_parser/common/pars.g b/util/ceg/EM_parser/common/pars.g index 3ec5e7529..a26b4d65a 100644 --- a/util/ceg/EM_parser/common/pars.g +++ b/util/ceg/EM_parser/common/pars.g @@ -44,7 +44,7 @@ char *to_change; } -%token C_INSTR, DEF_C_INSTR, CONDITION, ARROW, EQUIV, +%token C_INSTR, DEF_C_INSTR, CONDITION, ARROW, CALL, ASSEM_INSTR, DEFAULT, ERROR; %start table, table; %start def_row, def_row; @@ -79,13 +79,6 @@ simple : ARROW { save_output();} actionlist { back_patch();} ; -/* - | EQUIV { no_conversions = TRUE; save_output();} - actionlist { no_conversions = FALSE; back_patch();} - - ; -*/ - actionlist : { first_action = TRUE;} [ action { first_action = FALSE;} @@ -131,9 +124,6 @@ Dspecial: CONDITION { out( " %s ", yytext);} Dsimple : ARROW { out( "%s", yytext);} Dactionlist - | EQUIV { out( "%s", yytext);} - Dactionlist - ; Dactionlist : @@ -196,8 +186,6 @@ c_special : CONDITION c_simple: ARROW c_actionlist - | EQUIV - c_actionlist ; c_actionlist : @@ -254,8 +242,6 @@ int token; break; case ARROW : fprint( STDERR, "==> "); break; - case EQUIV : fprint( STDERR, "::= "); - break; case CONDITION: fprint( STDERR, "CONDITION %s", yytext); break; case DEFAULT : fprint( STDERR, "default ");