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
* CONDITION.
*/
int CALL_pos = FALSE; /* Needed to distinguish between
* C_INSTR CONDITION and CALL
*/
@ -65,6 +68,7 @@ int mylex()
*/
if ( special)
CD_pos = TRUE;
CALL_pos = FALSE;
return( '.');
}
break;
@ -73,12 +77,14 @@ int mylex()
case '=' : if ( arrow()) {
CD_pos = FALSE;
CALL_pos = TRUE;
return( ARROW);
}
break;
case ':' : if ( equiv()) {
CD_pos = FALSE;
CALL_pos = TRUE;
return( EQUIV);
}
break;
@ -102,6 +108,7 @@ int mylex()
}
if ( isalpha( c)) {
read_ident();
if ( CALL_pos) {
c = skip_space();
if ( c == '(') {
*next++ = c;
@ -110,6 +117,10 @@ int mylex()
}
else {
backc( c);
return( ERROR);
}
}
else {
if ( is_DEF_C_INSTR( yytext)) {
CD_pos = TRUE;
return( DEF_C_INSTR);