Fixed problem with multiple TOKSEP's
This commit is contained in:
parent
797441009d
commit
24dd6b4cb5
2 changed files with 7 additions and 3 deletions
|
@ -68,7 +68,7 @@ TABGEN = $(EMHOME)/bin/tabgen
|
||||||
PROF = #-pg
|
PROF = #-pg
|
||||||
CDEFS = $(EM_INCLUDES) $(LIB_INCLUDES)
|
CDEFS = $(EM_INCLUDES) $(LIB_INCLUDES)
|
||||||
CFLAGS = $(CDEFS) $(COPTIONS) $(PROF) -O
|
CFLAGS = $(CDEFS) $(COPTIONS) $(PROF) -O
|
||||||
LDFLAGS = -i $(PROF)
|
LDFLAGS = $(PROF)
|
||||||
|
|
||||||
# Grammar files and their objects
|
# Grammar files and their objects
|
||||||
LSRC = tokenfile.g declar.g statement.g expression.g program.g ival.g
|
LSRC = tokenfile.g declar.g statement.g expression.g program.g ival.g
|
||||||
|
|
|
@ -303,10 +303,12 @@ actual(repl)
|
||||||
It keeps in account the opening and closing brackets,
|
It keeps in account the opening and closing brackets,
|
||||||
preprocessor numbers, strings and character constants.
|
preprocessor numbers, strings and character constants.
|
||||||
*/
|
*/
|
||||||
register int ch;
|
register int ch = 0;
|
||||||
register int level = 0, nostashraw = 0;
|
register int level = 0, nostashraw = 0;
|
||||||
|
int lastch;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
lastch = ch;
|
||||||
ch = GetChar();
|
ch = GetChar();
|
||||||
|
|
||||||
if (Unstacked) {
|
if (Unstacked) {
|
||||||
|
@ -483,9 +485,11 @@ a_new_line: ch = GetChar();
|
||||||
return ')';
|
return ')';
|
||||||
}
|
}
|
||||||
stash(repl, ch, !nostashraw);
|
stash(repl, ch, !nostashraw);
|
||||||
} else
|
} else {
|
||||||
|
if (lastch == TOKSEP && ch == TOKSEP) continue;
|
||||||
stash(repl, ch, !nostashraw);
|
stash(repl, ch, !nostashraw);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_func(idef)
|
macro_func(idef)
|
||||||
|
|
Loading…
Add table
Reference in a new issue