Skip to content

Commit

Permalink
* common.mk (parse.c): depends on tool/ytab.sed.
Browse files Browse the repository at this point in the history
* tool/ytab.sed: hack for bison 2.1.


git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Dec 25, 2007
1 parent 0a79e4c commit d2068ff
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
Tue Dec 25 21:26:09 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>

* 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@technorama.net>

* ext/openssl/ossl_ssl.c: Only show a warning if the default
Expand Down
2 changes: 1 addition & 1 deletion common.mk
Expand Up @@ -368,7 +368,7 @@ enc.mk: $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/de

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 $<
Expand Down
22 changes: 21 additions & 1 deletion tool/ytab.sed
Expand Up @@ -5,6 +5,26 @@ i\
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"/

0 comments on commit d2068ff

Please sign in to comment.