[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] Changes to pspp/src/lexer.h
From: |
John Darrington |
Subject: |
[Pspp-cvs] Changes to pspp/src/lexer.h |
Date: |
Mon, 24 Oct 2005 01:41:56 -0400 |
Index: pspp/src/lexer.h
diff -u pspp/src/lexer.h:1.13 pspp/src/lexer.h:1.14
--- pspp/src/lexer.h:1.13 Sun Aug 21 07:21:06 2005
+++ pspp/src/lexer.h Mon Oct 24 05:41:45 2005
@@ -24,54 +24,8 @@
#include <ctype.h>
#include <stdbool.h>
-/* Returns nonzero if character CH may be the first character in an
- identifier. */
-#define CHAR_IS_ID1(CH) \
- (isalpha ((unsigned char) (CH)) \
- || (CH) == '@' \
- || (CH) == '#' \
- || (CH) == '$')
-
-/* Returns nonzero if character CH may be a character in an
- identifier other than the first. */
-#define CHAR_IS_IDN(CH) \
- (CHAR_IS_ID1 (CH) \
- || isdigit ((unsigned char) (CH)) \
- || (CH) == '.' \
- || (CH) == '_')
-
-/* Token types. */
-/* The order of the enumerals below is important. Do not change it. */
-enum
- {
- T_ID = 256, /* Identifier. */
- T_POS_NUM, /* Positive number. */
- T_NEG_NUM, /* Negative number. */
- T_STRING, /* Quoted string. */
- T_STOP, /* End of input. */
-
- T_AND, /* AND */
- T_OR, /* OR */
- T_NOT, /* NOT */
-
- T_EQ, /* EQ */
- T_GE, /* GE or >= */
- T_GT, /* GT or > */
- T_LE, /* LE or <= */
- T_LT, /* LT or < */
- T_NE, /* NE or ~= */
-
- T_ALL, /* ALL */
- T_BY, /* BY */
- T_TO, /* TO */
- T_WITH, /* WITH */
-
- T_EXP, /* ** */
-
- T_FIRST_KEYWORD = T_AND,
- T_LAST_KEYWORD = T_WITH,
- T_N_KEYWORDS = T_LAST_KEYWORD - T_FIRST_KEYWORD + 1
- };
+#include "lex-def.h"
+
extern int token;
extern double tokval;
@@ -110,11 +64,6 @@
int lex_force_id (void);
int lex_force_string (void);
-/* Comparing identifiers. */
-int lex_id_match_len (const char *keyword_string, size_t keyword_len,
- const char *token_string, size_t token_len);
-int lex_id_match (const char *keyword_string, const char *token_string);
-int lex_id_to_token (const char *id, size_t len);
/* Weird token functions. */
int lex_look_ahead (void);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] Changes to pspp/src/lexer.h,
John Darrington <=