/************************************************************************ * eatup -does the right thing to the rest of the line. * * * * Note: Every call to gettok after an end of file is * * encountered, returns an end of file * ************************************************************************/ subroutine eatup include ratfor.def integer gettok character t,token(MAXTOKEN) integer nlpar nlpar = 0 repeat [ i = gettok(token) if(i == LEXSEMICOL \ i == NEWLINE) break if(i == LEXBEGIN \ i == LEXEND)[ call pbstr(token) break ] if(i == EOF)[ #unexpected end of file call synerr(S_EOF) type *,'eatup' break ] if(i == LEXLPAREN) nlpar = nlpar+1 else if(i == LEXRPAREN) nlpar = nlpar-1 call outstr(token) ] until (nlpar < 0) if(nlpar ^= 0)call synerr(S_UNBAL_PARENS) return end