cleaned up a bit
authorceriel <none@none>
Thu, 26 Jan 1989 14:43:09 +0000 (14:43 +0000)
committerceriel <none@none>
Thu, 26 Jan 1989 14:43:09 +0000 (14:43 +0000)
util/ceg/EM_parser/common/Makefile
util/ceg/EM_parser/common/action.c
util/ceg/EM_parser/common/mylex.c
util/ceg/EM_parser/common/pars.g

index 38ce89a..cdfef6b 100644 (file)
@@ -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)
 
index 59581a9..c136174 100644 (file)
@@ -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 '.' ? */
 
index 6677373..bd09b40 100644 (file)
@@ -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);
 }
index 3ec5e75..a26b4d6 100644 (file)
@@ -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 ");