blob: 689c229d6debc5787032c70712637bb8699d60b0 (
plain) (
tree)
|
|
#include <stdio.h>
#include <string.h>
#include "token.h"
#include "getch.h"
#include "dcl.h"
char datatype[MAXTOKEN];
int main(void)
{
while (gettoken() != EOF) {
if (tokentype == '\n') /* skip empty lines */
continue;
datatype[0] = '\0';
do {
strcat(datatype, token);
strcat(datatype, " ");
} while (gettoken() == NAME && isdtspec());
prevtoken = YES;
if (tokentype == EOF)
break;
out[0] = '\0';
dcl();
if (tokentype != '\n')
printf("synatx error\n");
printf("%s: %s %s\n", name, out, datatype);
}
return 0;
}
|