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

ruby-changes:3204

From: ko1@a...
Date: 25 Dec 2007 21:26:29 +0900
Subject: [ruby-changes:3204] nobu - Ruby:r14697 (trunk): * common.mk (parse.c): depends on tool/ytab.sed.

nobu	2007-12-25 21:26:11 +0900 (Tue, 25 Dec 2007)

  New Revision: 14697

  Modified files:
    trunk/ChangeLog
    trunk/common.mk
    trunk/tool/ytab.sed

  Log:
    * common.mk (parse.c): depends on tool/ytab.sed.
    
    * tool/ytab.sed: hack for bison 2.1.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14697&r2=14696
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/tool/ytab.sed?r1=14697&r2=14696
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/common.mk?r1=14697&r2=14696

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14696)
+++ ChangeLog	(revision 14697)
@@ -1,3 +1,9 @@
+Tue Dec 25 21:26:09 2007  Nobuyoshi Nakada  <nobu@r...>
+
+	* common.mk (parse.c): depends on tool/ytab.sed.
+
+	* tool/ytab.sed: hack for bison 2.1.
+
 Tue Dec 25 20:24:58 2007  Technorama Ltd.  <oss-ruby@t...>
 
 	* ext/openssl/ossl_ssl.c: Only show a warning if the default 
Index: common.mk
===================================================================
--- common.mk	(revision 14696)
+++ common.mk	(revision 14697)
@@ -368,7 +368,7 @@
 
 PHONY:
 
-{$(VPATH)}parse.c: {$(VPATH)}parse.y
+{$(VPATH)}parse.c: {$(VPATH)}parse.y $(srcdir)/tool/ytab.sed
 
 {$(srcdir)}.y.c:
 	$(YACC) $(YFLAGS) -o y.tab.c $<
Index: tool/ytab.sed
===================================================================
--- tool/ytab.sed	(revision 14696)
+++ tool/ytab.sed	(revision 14697)
@@ -5,6 +5,26 @@
 a\
 #endif
 }
-s/^[ 	]*\(yyerror[ 	]*([ 	]*parser,\)/parser_\1/
+/^yydestruct/,/#endif/{
+  /^yydestruct/{
+    /parser/!{
+      h
+      s/^/ruby_parser_&/
+      s/)$/, parser)/
+      /\*/s/parser)$/struct parser_params *&/
+    }
+  }
+  /^#endif/{
+    x
+    /^./{
+      i\
+    struct parser_params *parser;
+      a\
+#define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, parser)
+    }
+    x
+  }
+}
+s/^\([ 	]*\)\(yyerror[ 	]*([ 	]*parser,\)/\1parser_\2/
 s!^ *extern char \*getenv();!/* & */!
 s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/

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

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