]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/dash/contrib/src/parser.h
Update
[l4.git] / l4 / pkg / dash / contrib / src / parser.h
index 6bdf1c9e873e0400a40a1014a278559b40c796c0..2875cce6d42419265f6152b31f1bef1973245e27 100644 (file)
@@ -34,6 +34,8 @@
  *     @(#)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);
@@ -92,3 +94,8 @@ goodname(const char *p)
 {
        return !*endofname(p);
 }
+
+static inline int parser_eof(void)
+{
+       return tokpushback && lasttoken == TEOF;
+}