* @(#)parser.h 8.3 (Berkeley) 5/4/95
*/
+#include "token.h"
+
/* control characters in argument strings */
#define CTL_FIRST -127 /* first 'special' character */
#define CTLESC -127 /* escape next character */
* must be distinct from NULL, so we use the address of a variable that
* happens to be handy.
*/
+extern int lasttoken;
extern int tokpushback;
#define NEOF ((union node *)&tokpushback)
extern int whichprompt; /* 1 == PS1, 2 == PS2 */
extern int checkkwd;
-extern int startlinno; /* line # where last token started */
union node *parsecmd(int);
{
return !*endofname(p);
}
+
+static inline int parser_eof(void)
+{
+ return tokpushback && lasttoken == TEOF;
+}