diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-04-13 06:36:04 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-04-13 06:36:04 +0000 |
commit | 99ec66f4465e09dbfe034559fc31ec02c6fbc8a2 (patch) | |
tree | 859110c080bb3c828bebc77a61085c4c92185110 /usr.bin/bc | |
parent | 5c1e37a35295e64d067f934c94ce0ab5ef9d387d (diff) |
Always use lex in interactive mode. Makes bc running as a co-process
behave. Very, very little performance loss. Spotted by and ok fschg@
Diffstat (limited to 'usr.bin/bc')
-rw-r--r-- | usr.bin/bc/scan.l | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/bc/scan.l b/usr.bin/bc/scan.l index ea243f70e25..ca700b6031c 100644 --- a/usr.bin/bc/scan.l +++ b/usr.bin/bc/scan.l @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: scan.l,v 1.17 2005/03/28 17:43:28 deraadt Exp $ */ +/* $OpenBSD: scan.l,v 1.18 2005/04/13 06:36:03 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> @@ -18,13 +18,14 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: scan.l,v 1.17 2005/03/28 17:43:28 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: scan.l,v 1.18 2005/04/13 06:36:03 otto Exp $"; #endif /* not lint */ #include <err.h> #include <signal.h> #include <stdbool.h> #include <string.h> +#include <unistd.h> #include "extern.h" #include "pathnames.h" @@ -42,6 +43,8 @@ static void add_str(const char *); %} +%option always-interactive + DIGIT [0-9A-F] ALPHA [a-z_] ALPHANUM [a-z_0-9] |