[#1] Welcome to the ruby-core mailing list — matz@... (Yukihiro Matsumoto)
Hi,
[#7] Useless patch... — Michal Rokos <m.rokos@...>
Hi,
[#19] Re: [BUG] thread failure after trap — nobu.nokada@...
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
[#42] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...>
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
>>>>> "t" == ts <decoux@moulon.inra.fr> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
[#59] yyparse() and friends >> rubyparse() or rbparse()... — Sean Chittenden <sean@...>
Would it be possible to add '-p ruby' to the bison command line args
Hi,
> |Would it be possible to add '-p ruby' to the bison command line
[#67] The warns-a-thon continues... — Sean Chittenden <sean@...>
I'm feeling left out in this race to clobber warnings!!! Attached are
Hi,
Hi,
> :*) Fixed some sprintf() format type mismatches
[#86] rb_hash_has_key() and friends non-static... — Sean Chittenden <sean@...>
I'm doing a lot of work with Ruby in C and am using some of Ruby's
At the moment I'm writing an appendix Beginning Ruby Programming
Hi,
[#104] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...>
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
Hi,
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
>>>>> "t" == ts <decoux@moulon.inra.fr> writes:
Hi,
Re: yyparse() and friends >> rubyparse() or rbparse()...
> > |All -p does is add a few #defines for build time at the top of > > |the generated parser. I think it would be trivial to duplicate > > |this by adding this to parse.y. > > > > We already have those #defines in intern.h, so do you mean you > > want to move them to parse.y? > > Hmm... let me look at the code. Looks like this is even easier to > solve than we'd thought. Could someone please apply the attached > patch? -sc Err... the previous patch didn't break ruby, but didn't fix my linking/build problem. The attached patch, however fixes everything and does work. -sc -- Sean Chittenden
Attachments (1)
? patch
? test.rb
Index: intern.h
===================================================================
RCS file: /src/ruby/intern.h,v
retrieving revision 1.88
diff -u -r1.88 intern.h
--- intern.h 2002/04/26 00:40:28 1.88
+++ intern.h 2002/05/28 07:56:02
@@ -284,12 +284,6 @@
/* parse.y */
EXTERN int ruby_sourceline;
EXTERN char *ruby_sourcefile;
-#define yyparse ruby_yyparse
-#define yylex ruby_yylex
-#define yyerror ruby_yyerror
-#define yylval ruby_yylval
-#define yychar ruby_yychar
-#define yydebug ruby_yydebug
int yyparse _((void));
ID rb_id_attrset _((ID));
void rb_parser_append_print _((void));
Index: parse.y
===================================================================
RCS file: /src/ruby/parse.y,v
retrieving revision 1.172
diff -u -r1.172 parse.y
--- parse.y 2002/05/22 09:37:45 1.172
+++ parse.y 2002/05/28 07:56:03
@@ -15,11 +15,19 @@
#define YYDEBUG 1
#include "ruby.h"
#include "env.h"
+#include "intern.h"
#include "node.h"
#include "st.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
+
+#define yyparse ruby_yyparse
+#define yylex ruby_yylex
+#define yyerror ruby_yyerror
+#define yylval ruby_yylval
+#define yychar ruby_yychar
+#define yydebug ruby_yydebug
#define ID_SCOPE_SHIFT 3
#define ID_SCOPE_MASK 0x07
Index: ruby.c
===================================================================
RCS file: /src/ruby/ruby.c,v
retrieving revision 1.61
diff -u -r1.61 ruby.c
--- ruby.c 2002/05/23 07:41:53 1.61
+++ ruby.c 2002/05/28 07:56:04
@@ -46,7 +46,7 @@
VALUE ruby_verbose = Qfalse;
static int sflag = 0;
static int xflag = 0;
-extern int yydebug;
+extern int ruby_yydebug;
char *ruby_inplace_mode = Qfalse;
@@ -436,7 +436,7 @@
goto reswitch;
case 'y':
- yydebug = 1;
+ ruby_yydebug = 1;
s++;
goto reswitch;
@@ -612,7 +612,7 @@
ruby_verbose = Qtrue;
}
else if (strcmp("yydebug", s) == 0)
- yydebug = 1;
+ ruby_yydebug = 1;
else if (strcmp("help", s) == 0) {
usage(origargv[0]);
exit(0);