# include "../lexgen1/ldefs.c"

usrtab()
{
	char line[100], *s;
	int i, c, n;
	gets(s);
	lineno--;
	for(i=0; i<NCH; i++)
		ctable[i]=0;
while (gets(s=line) && !scomp(s, "%T") && !scomp(s, "%t"))
	{
	while (space(*s)) s++;
	n=0;
	while (digit(*s))
		n = n*10+ *s++ - '0';
	if (n<=0 || n>= NCH)
		{
		warning("character value %d out of range",n);
		continue;
		}
	while (space(*s))
		s++;
	while (*s)
		{
		c = ctrans(&s);
		if (ctable[c])
			if (printable(c))
				error("character '%c' used twice",c);
			else
				error("character %o used twice",c);
		ctable[c] = n;
		s++;
		}
	}
lineno++;
}
