chiark / gitweb /
Do not ignore errors from readdir.
[userv.git] / lexer.l
diff --git a/lexer.l b/lexer.l
index 5b98073c2b8cc88f697680784c60afcf8566cdfb..d75ed270bbdab3688829c950cf1d428c8fa8fa20 100644 (file)
--- a/lexer.l
+++ b/lexer.l
@@ -230,6 +230,9 @@ local7 { lr_logfacility= LOG_LOCAL7; return tokv_syslog_local7; }
 read { return tokv_word_read; }
 write { return tokv_word_write; }
 \$ { return tokv_dollar; }
+stdin {  lr_max= lr_min= 0; return tokv_word_stdin; }
+stdout {  lr_max= lr_min= 1; return tokv_word_stdout; }
+stderr {  lr_max= lr_min= 2; return tokv_word_stderr; }
 \( { return tokv_openparen; }
 \) { return tokv_closeparen; }
 \! { return tokv_not; }
@@ -249,7 +252,7 @@ error { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
                          char *ep;
                          lr_min= (int)strtoul(yytext,&ep,10);
                          assert(*ep == HYPHEN);
-                         assert(*++ep);
+                         ep++;  assert(*ep);
                          lr_max= (int)strtoul(ep,&ep,10);
                          assert(!*ep);
                          if (lr_max < lr_min)
@@ -260,7 +263,7 @@ error { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
                          char *ep;
                          lr_min= (int)strtoul(yytext,&ep,10);
                          assert(*ep == HYPHEN);
-                         assert(!*++ep);
+                         ep++;  assert(!*ep);
                          lr_max=-1;
                          return tokv_fdstoend;
                        }