Previous version saw C_INSTR CONDITION as CALL ( e.g. C_asp ( $1 == 1) ).

This commit is contained in:
kaashoek 1988-02-03 10:47:08 +00:00
parent e8f2566542
commit 474b2eb453

View file

@ -40,6 +40,9 @@ int CD_pos = FALSE; /* 'CD_pos' is used as a flag to signal if it is
* This flag is needed because CALL is a subset of * This flag is needed because CALL is a subset of
* CONDITION. * CONDITION.
*/ */
int CALL_pos = FALSE; /* Needed to distinguish between
* C_INSTR CONDITION and CALL
*/
@ -65,6 +68,7 @@ int mylex()
*/ */
if ( special) if ( special)
CD_pos = TRUE; CD_pos = TRUE;
CALL_pos = FALSE;
return( '.'); return( '.');
} }
break; break;
@ -73,12 +77,14 @@ int mylex()
case '=' : if ( arrow()) { case '=' : if ( arrow()) {
CD_pos = FALSE; CD_pos = FALSE;
CALL_pos = TRUE;
return( ARROW); return( ARROW);
} }
break; break;
case ':' : if ( equiv()) { case ':' : if ( equiv()) {
CD_pos = FALSE; CD_pos = FALSE;
CALL_pos = TRUE;
return( EQUIV); return( EQUIV);
} }
break; break;
@ -102,6 +108,7 @@ int mylex()
} }
if ( isalpha( c)) { if ( isalpha( c)) {
read_ident(); read_ident();
if ( CALL_pos) {
c = skip_space(); c = skip_space();
if ( c == '(') { if ( c == '(') {
*next++ = c; *next++ = c;
@ -110,6 +117,10 @@ int mylex()
} }
else { else {
backc( c); backc( c);
return( ERROR);
}
}
else {
if ( is_DEF_C_INSTR( yytext)) { if ( is_DEF_C_INSTR( yytext)) {
CD_pos = TRUE; CD_pos = TRUE;
return( DEF_C_INSTR); return( DEF_C_INSTR);