if ((c1 = yyinput()) != '/' && c != 0) {
unput(c1);
goto loop;
}
#endif
}
static void comment1(){
char c;
BString comment;
while((c = yyinput()) != '\n' && c != 0){
comment = comment + c;
}
if(c != 0){
unput(c);
}
yylval = new Node(Node::TCOMMENT, comment);
}
static void preProcess() {
char c;
BString linestr;
char file[256];
int lineno;
#if DOECHO
ECHO;
while ((c = yyinput()) != '\n' && c != 0){
putchar(c);
if (c == '\n')
putchar(c);
}
#else
while ((c = yyinput()) != '\n' && c != 0)
linestr = linestr + c;
file[0] = '\0';
sscanf(linestr.retStr(), "%d \"%s\"", &lineno, file);
if(strlen(file))
file[strlen(file) - 1] = 0;
line = lineno;
fileName = file;
#endif
}
static void nextLine(){
column = 0;
line++;
#if DOECHO
ECHO;
#endif
}
static void count()
{
int i;
for (i = 0; yytext[i] != '\0'; i++)
if (yytext[i] == '\n')
column = 0;
else if (yytext[i] == '\t')
column += 8 - (column % 8);
else
column++;
yylval = new Node(Node::TNONE, yytext);
#if DOECHO
ECHO;
#endif
}
/* Check if type exists */
static int typeCheck(){
if(gtypelist.search(yytext))
return(TYPE_NAME);
else
return(IDENTIFIER);
}