aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-07-15 21:27:52 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:02:13 -0700
commit327997cc3031677b5c208c48d806821e31a40ccc (patch)
treeb8385d56dd851c349bf0fbcd62b0aeee30e97663 /token.h
parentFix up "alignof" handling. (diff)
downloadsparse-327997cc3031677b5c208c48d806821e31a40ccc.tar.gz
sparse-327997cc3031677b5c208c48d806821e31a40ccc.tar.bz2
sparse-327997cc3031677b5c208c48d806821e31a40ccc.zip
[PATCH] speed up (and fix corner case in) tokenizer
This makes our own specialized version of "ctype.h"-like character classes, which has the extra magic classes we need to look up things like "can this character be the second character of a special token". Also fix a corner case in ## handling (## shouldn't glue / with / or / with *).
Diffstat (limited to 'token.h')
-rw-r--r--token.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/token.h b/token.h
index 32cd070..8f6b082 100644
--- a/token.h
+++ b/token.h
@@ -71,7 +71,7 @@ enum token_type {
"+=", "++", \
"-=", "--", "->", \
"*=", \
- "/=", "/*", "//", \
+ "/=", \
"%=", \
"..", "...", \
"<=", "<<", "<<=", \
@@ -92,8 +92,6 @@ enum special_token {
SPECIAL_DEREFERENCE,
SPECIAL_MUL_ASSIGN,
SPECIAL_DIV_ASSIGN,
- SPECIAL_COMMENT,
- SPECIAL_CPPCOMMENT,
SPECIAL_MOD_ASSIGN,
SPECIAL_DOTDOT,
SPECIAL_ELLIPSIS,