[前][次][番号順一覧][スレッド一覧]

ruby-changes:8295

From: nobu <ko1@a...>
Date: Fri, 17 Oct 2008 20:56:30 +0900 (JST)
Subject: [ruby-changes:8295] Ruby:r19823 (trunk): * id.h: reverted.

nobu	2008-10-17 20:56:11 +0900 (Fri, 17 Oct 2008)

  New Revision: 19823

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19823

  Log:
    * id.h: reverted.

  Added files:
    trunk/id.h
  Removed files:
    trunk/template/id.h.tmpl
  Modified files:
    trunk/ChangeLog
    trunk/common.mk

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19822)
+++ ChangeLog	(revision 19823)
@@ -1,14 +1,10 @@
 Fri Oct 17 19:46:20 2008  Nobuyoshi Nakada  <nobu@r...>
 
-	* common.mk (ID_H_TARGET): phony target to update id.h.
-
 	* tool/ifchange, win32/ifchange.bat: --timestamp option added.
 
 	* tool/generic_erb.rb: --timestamp, --output and --if-change options
 	  added.
 
-	* template/id.h.tmpl: moved from id.h.
-
 Fri Oct 17 18:33:12 2008  Yuki Sonoda (Yugui)  <yugui@y...>
 
 	* array.c (ary_resize_capa): renamed RESIZE_CAPA.
Index: common.mk
===================================================================
--- common.mk	(revision 19822)
+++ common.mk	(revision 19823)
@@ -645,12 +645,10 @@
 	$(MINIRUBY) $(srcdir)/enc/trans/make_transdb.rb $@.new $(srcdir)/enc/trans enc/trans
 	$(IFCHANGE) "$@" "$@.new"
 
-{$(VPATH)}id.h:
-	$(CPP) $(CPPFLAGS) -DUSE_PARSE_H $@
+# {$(VPATH)}id.h: {$(VPATH)}parse.h $(srcdir)/tool/generic_erb.rb $(srcdir)/template/id.h.tmpl
+# 	$(BASERUBY) $(srcdir)/tool/generic_erb.rb --if-change --output=$@ \
+# 		$(srcdir)/template/id.h.tmpl --vpath=$(VPATH) parse.h
 
-$(ID_H_TARGET): {$(VPATH)}parse.c $(srcdir)/tool/generic_erb.rb $(srcdir)/template/id.h.tmpl
-	$(BASERUBY) $(srcdir)/tool/generic_erb.rb --if-change --output=$(srcdir)/id.h $(srcdir)/template/id.h.tmpl --vpath=$(VPATH) parse.c
-
 known_errors.inc: $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
 	$(BASERUBY) $(srcdir)/tool/generic_erb.rb $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def > $@
 
Index: id.h
===================================================================
--- id.h	(revision 0)
+++ id.h	(revision 19823)
@@ -0,0 +1,152 @@
+/**********************************************************************
+
+  id.h - 
+
+  $Author: ko1 $
+  created at: Thu Jul 12 04:38:07 2007
+
+  Copyright (C) 2007 Koichi Sasada
+
+**********************************************************************/
+
+#ifndef RUBY_ID_H
+#define RUBY_ID_H
+
+#define ID_SCOPE_SHIFT 3
+#define ID_SCOPE_MASK 0x07
+#define ID_LOCAL      0x00
+#define ID_INSTANCE   0x01
+#define ID_GLOBAL     0x03
+#define ID_ATTRSET    0x04
+#define ID_CONST      0x05
+#define ID_CLASS      0x06
+#define ID_JUNK       0x07
+#define ID_INTERNAL   ID_JUNK
+
+#ifdef USE_PARSE_H
+#include "parse.h"
+#endif
+
+#define symIFUNC ID2SYM(idIFUNC)
+#define symCFUNC ID2SYM(idCFUNC)
+
+enum ruby_method_ids {
+#ifndef tLAST_TOKEN
+    tUPLUS = 321,
+    tUMINUS = 322,
+    tPOW = 323,
+    tCMP = 324,
+    tEQ = 325,
+    tEQQ = 326,
+    tNEQ = 327,
+    tGEQ = 328,
+    tLEQ = 329,
+    tANDOP = 330,
+    tOROP = 331,
+    tMATCH = 332,
+    tNMATCH = 333,
+    tDOT2 = 334,
+    tDOT3 = 335,
+    tAREF = 336,
+    tASET = 337,
+    tLSHFT = 338,
+    tRSHFT = 339,
+    tLAMBDA = 352,
+    idNULL = 365,
+    idRespond_to = 366,
+    idIFUNC = 367,
+    idCFUNC = 368,
+    idThrowState = 369,
+    id_core_set_method_alias = 370,
+    id_core_set_variable_alias = 371,
+    id_core_undef_method = 372,
+    id_core_define_method = 373,
+    id_core_define_singleton_method = 374,
+    id_core_set_postexe = 375,
+    tLAST_TOKEN = 376,
+#elif tUPLUS != 321 || \
+    tUMINUS != 322 || \
+    tPOW != 323 || \
+    tCMP != 324 || \
+    tEQ != 325 || \
+    tEQQ != 326 || \
+    tNEQ != 327 || \
+    tGEQ != 328 || \
+    tLEQ != 329 || \
+    tANDOP != 330 || \
+    tOROP != 331 || \
+    tMATCH != 332 || \
+    tNMATCH != 333 || \
+    tDOT2 != 334 || \
+    tDOT3 != 335 || \
+    tAREF != 336 || \
+    tASET != 337 || \
+    tLSHFT != 338 || \
+    tRSHFT != 339 || \
+    tLAMBDA != 352 || \
+    idNULL != 365 || \
+    idRespond_to != 366 || \
+    idIFUNC != 367 || \
+    idCFUNC != 368 || \
+    idThrowState != 369 || \
+    id_core_set_method_alias != 370 || \
+    id_core_set_variable_alias != 371 || \
+    id_core_undef_method != 372 || \
+    id_core_define_method != 373 || \
+    id_core_define_singleton_method != 374 || \
+    id_core_set_postexe != 375 || \
+    tLAST_TOKEN != 376
+#error id.h is out of date.
+#endif
+    idPLUS = '+',
+    idMINUS = '-',
+    idMULT = '*',
+    idDIV = '/',
+    idMOD = '%',
+    idLT = '<',
+    idLTLT = tLSHFT,
+    idLE = tLEQ,
+    idGT = '>',
+    idGE = tGEQ,
+    idEq = tEQ,
+    idEqq = tEQQ,
+    idNeq = tNEQ,
+    idNot = '!',
+    idBackquote = '`',
+    idEqTilde = tMATCH,
+    idAREF = tAREF,
+    idASET = tASET,
+    idLAST_TOKEN = tLAST_TOKEN >> ID_SCOPE_SHIFT,
+    tIntern,
+    tMethodMissing,
+    tLength,
+    tGets,
+    tSucc,
+    tEach,
+    tLambda,
+    tSend,
+    t__send__,
+    tInitialize,
+#if SUPPORT_JOKE
+    tBitblt,
+    tAnswer,
+#endif
+    tLAST_ID,
+#define TOKEN2ID(n) id##n = ((t##n<<ID_SCOPE_SHIFT)|ID_LOCAL)
+    TOKEN2ID(Intern),
+    TOKEN2ID(MethodMissing),
+    TOKEN2ID(Length),
+    TOKEN2ID(Gets),
+    TOKEN2ID(Succ),
+    TOKEN2ID(Each),
+    TOKEN2ID(Lambda),
+    TOKEN2ID(Send),
+    TOKEN2ID(__send__),
+    TOKEN2ID(Initialize),
+#if SUPPORT_JOKE
+    TOKEN2ID(Bitblt),
+    TOKEN2ID(Answer),
+#endif
+};
+
+#endif /* RUBY_ID_H */

Property changes on: id.h
___________________________________________________________________
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Index: template/id.h.tmpl
===================================================================
--- template/id.h.tmpl	(revision 19822)
+++ template/id.h.tmpl	(revision 19823)
@@ -1,115 +0,0 @@
-%#  -*- c -*-
-/* DO NOT EDIT THIS FILE DIRECTLY */
-/**********************************************************************
-
-  id.h - 
-
-  $Author: ko1 $
-  created at: Thu Jul 12 04:38:07 2007
-
-  Copyright (C) 2007 Koichi Sasada
-
-**********************************************************************/
-<%
-require 'optparse'
-vpath = ["."]
-input = nil
-opt = OptionParser.new do |o|
-  o.on('-v', '--vpath=DIR') {|dirs| vpath.concat dirs.split(File::PATH_SEPARATOR)}
-  input, = o.order!(ARGV)
-end or abort opt.opt_s
-
-tokens = nil
-vpath.find do |dir|
-  begin
-    if line = File.read(File.join(dir, input))[/^\s*enum\s+yytokentype\s*\{([^{}]*)\s*\};/m, 1]
-      tokens = line.scan(/\b(t(?:LAST_TOKEN|U(?:PLUS|MINUS)|POW|CMP|EQQ?|[NGL]EQ|(?:AND|OR)OP|N?MATCH|DOT\d|AREF|ASET|[LR]SHFT|LAMBDA)|id\w+)\s*=\s*(\d+),?/m)
-    end
-  rescue Errno::ENOENT
-    nil
-  else
-    true
-  end
-end
-%>
-#ifndef RUBY_ID_H
-#define RUBY_ID_H
-
-#define ID_SCOPE_SHIFT 3
-#define ID_SCOPE_MASK 0x07
-#define ID_LOCAL      0x00
-#define ID_INSTANCE   0x01
-#define ID_GLOBAL     0x03
-#define ID_ATTRSET    0x04
-#define ID_CONST      0x05
-#define ID_CLASS      0x06
-#define ID_JUNK       0x07
-#define ID_INTERNAL   ID_JUNK
-
-#ifdef USE_PARSE_H
-#include "parse.h"
-#endif
-
-#define symIFUNC ID2SYM(idIFUNC)
-#define symCFUNC ID2SYM(idCFUNC)
-
-enum ruby_method_ids {
-#ifndef tLAST_TOKEN
-% tokens.each do |token, value|
-    <%=token%> = <%=value%>,
-% end
-#elif <%= tokens.map {|token, value|"#{token} != #{value}"}.join(" || \\\n    ") %>
-#error id.h is out of date.
-#endif
-    idPLUS = '+',
-    idMINUS = '-',
-    idMULT = '*',
-    idDIV = '/',
-    idMOD = '%',
-    idLT = '<',
-    idLTLT = tLSHFT,
-    idLE = tLEQ,
-    idGT = '>',
-    idGE = tGEQ,
-    idEq = tEQ,
-    idEqq = tEQQ,
-    idNeq = tNEQ,
-    idNot = '!',
-    idBackquote = '`',
-    idEqTilde = tMATCH,
-    idAREF = tAREF,
-    idASET = tASET,
-    idLAST_TOKEN = tLAST_TOKEN >> ID_SCOPE_SHIFT,
-    tIntern,
-    tMethodMissing,
-    tLength,
-    tGets,
-    tSucc,
-    tEach,
-    tLambda,
-    tSend,
-    t__send__,
-    tInitialize,
-#if SUPPORT_JOKE
-    tBitblt,
-    tAnswer,
-#endif
-    tLAST_ID,
-#define TOKEN2ID(n) id##n = ((t##n<<ID_SCOPE_SHIFT)|ID_LOCAL)
-    TOKEN2ID(Intern),
-    TOKEN2ID(MethodMissing),
-    TOKEN2ID(Length),
-    TOKEN2ID(Gets),
-    TOKEN2ID(Succ),
-    TOKEN2ID(Each),
-    TOKEN2ID(Lambda),
-    TOKEN2ID(Send),
-    TOKEN2ID(__send__),
-    TOKEN2ID(Initialize),
-#if SUPPORT_JOKE
-    TOKEN2ID(Bitblt),
-    TOKEN2ID(Answer),
-#endif
-};
-
-#endif /* RUBY_ID_H */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]