commit 25995fe7bf087969591f9fac6aafbb74f79ecadd
parent cbc42d41142c2261b7d02ca74c2d43777847564d
Author: tjg <tjg>
Date: Mon, 27 Nov 2000 12:46:54 +0000
revert to 1.4
Diffstat:
M | lex.c | | | 16 | ++++------------ |
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/lex.c b/lex.c
@@ -33,7 +33,7 @@ static void getpair(int);
int lineno;
-char nw[] = {
+const char nw[] = {
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
@@ -44,7 +44,7 @@ char nw[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
-char dnw[] = {
+const char dnw[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0,
@@ -63,8 +63,6 @@ static bool prerror = FALSE;
static wordstates w = NW;
static int fd_left, fd_right;
-int mbassign = 1;
-
#define checkfreecaret {if (w != NW) { w = NW; ugchar(c); return '^'; }}
enum filedescriptors {
@@ -76,7 +74,7 @@ extern int yylex() {
bool saw_meta = FALSE;
int c;
size_t i; /* The purpose of all these local assignments is to */
- char *meta; /* allow optimizing compilers like gcc to load these */
+ const char *meta; /* allow optimizing compilers like gcc to load these */
char *buf = realbuf; /* values into registers. On a sparc this is a */
YYSTYPE *y = &yylval; /* win, in code size *and* execution time */
if (errset) {
@@ -95,7 +93,6 @@ top: while ((c = gchar()) == ' ' || c == '\t')
w = NW;
if (c == EOF)
return END;
- meta['='] = (mbassign == 1);
if (!meta[(unsigned char) c]) { /* it's a word or keyword. */
checkfreecaret;
w = RW;
@@ -227,15 +224,10 @@ top: while ((c = gchar()) == ' ' || c == '\t')
case ';':
case '^':
case ')':
+ case '=':
case '{': case '}':
w = NW;
return c;
- case '=':
- if (mbassign == 1) {
- w = NW;
- return EQUALS;
- }
- return '=';
case '&':
w = NW;
c = gchar();