In dtrace lexer, do not unput token if it is EOF.

This is harmless with OpenSolaris fex and yacc, but with FreeBSD
causes '\xff' symbol to be physically put into input buffer, causing
subsequent syntax error.

MFC after: 1 week
This commit is contained in:
Alexander Kabaev 2010-06-11 04:38:14 +00:00
parent ec4c19fcf0
commit e9bc68ba9c

View File

@ -811,7 +811,8 @@ id_or_type(const char *s)
longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
}
unput(c0);
if (c0 != EOF)
unput(c0);
return (ttok);
}