summaryrefslogtreecommitdiff
path: root/symbol.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-05 04:04:00 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-05 04:04:00 (GMT)
commit72b785e07210c7419802caa3595fc03d84df2c3a (patch)
tree618b9df3d58a48193bba18ccbc56819b41c900b4 /symbol.c
parentfcd15352327bb7d6c8db952e8c3fb3ce7412cca1 (diff)
id.def: token_ops
* defs/id.def (token_ops): gather associations between IDs, operators, and parser tokens. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/symbol.c b/symbol.c
index 795c22d..f46acf2 100644
--- a/symbol.c
+++ b/symbol.c
@@ -30,55 +30,6 @@ static ID register_static_symid_str(ID, VALUE);
#define is_identchar(p,e,enc) (rb_enc_isalnum((unsigned char)(*(p)),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))
-#define tUPLUS RUBY_TOKEN(UPLUS)
-#define tUMINUS RUBY_TOKEN(UMINUS)
-#define tPOW RUBY_TOKEN(POW)
-#define tCMP RUBY_TOKEN(CMP)
-#define tEQ RUBY_TOKEN(EQ)
-#define tEQQ RUBY_TOKEN(EQQ)
-#define tNEQ RUBY_TOKEN(NEQ)
-#define tGEQ RUBY_TOKEN(GEQ)
-#define tLEQ RUBY_TOKEN(LEQ)
-#define tMATCH RUBY_TOKEN(MATCH)
-#define tNMATCH RUBY_TOKEN(NMATCH)
-#define tDOT2 RUBY_TOKEN(DOT2)
-#define tDOT3 RUBY_TOKEN(DOT3)
-#define tAREF RUBY_TOKEN(AREF)
-#define tASET RUBY_TOKEN(ASET)
-#define tLSHFT RUBY_TOKEN(LSHFT)
-#define tRSHFT RUBY_TOKEN(RSHFT)
-#define tCOLON2 RUBY_TOKEN(COLON2)
-#define tANDOP RUBY_TOKEN(ANDOP)
-#define tOROP RUBY_TOKEN(OROP)
-#define tDOTQ RUBY_TOKEN(DOTQ)
-
-static const struct {
- unsigned short token;
- const char name[3], term;
-} op_tbl[] = {
- {tDOT2, ".."},
- {tDOT3, "..."},
- {tPOW, "**"},
- {tUPLUS, "+@"},
- {tUMINUS, "-@"},
- {tCMP, "<=>"},
- {tGEQ, ">="},
- {tLEQ, "<="},
- {tEQ, "=="},
- {tEQQ, "==="},
- {tNEQ, "!="},
- {tMATCH, "=~"},
- {tNMATCH, "!~"},
- {tAREF, "[]"},
- {tASET, "[]="},
- {tLSHFT, "<<"},
- {tRSHFT, ">>"},
- {tCOLON2, "::"},
- {tANDOP, "&&"},
- {tOROP, "||"},
- {tDOTQ, ".?"},
-};
-
#define op_tbl_count numberof(op_tbl)
STATIC_ASSERT(op_tbl_name_size, sizeof(op_tbl[0].name) == 3);
#define op_tbl_len(i) (!op_tbl[i].name[1] ? 1 : !op_tbl[i].name[2] ? 2 : 3)