summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-19 18:48:29 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-19 18:48:29 +0000
commit0ad4ae91ea6c9c489946a390b231e90c1bf9eedd (patch)
treedb69adc6e49ab76aba51a7cb4cf76f74f3784039
parent44abd808658570a65df2adca678c746aa0356960 (diff)
* parse.y [ripper]: spaces before heredoc marker was lost.
* keywords: rb_reserved_word() should be defined only in ruby core. * lex.c: sync with keywords. * ext/ripper/ripper.rb.in (parse): fix typo. * ext/ripper/lib/ripper.rb: sync with ripper.rb.in. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog13
-rw-r--r--ext/ripper/lib/ripper.rb2
-rw-r--r--ext/ripper/ripper.rb.in2
-rw-r--r--keywords5
-rw-r--r--lex.c6
-rw-r--r--parse.y1
6 files changed, 26 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a128ccb7ee..8451c7cb081 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Mon Sep 20 03:46:54 2004 Minero Aoki <aamine@loveruby.net>
+
+ * parse.y [ripper]: spaces before heredoc marker was lost.
+
+ * keywords: rb_reserved_word() should be defined only in ruby
+ core.
+
+ * lex.c: sync with keywords.
+
+ * ext/ripper/ripper.rb.in (parse): fix typo.
+
+ * ext/ripper/lib/ripper.rb: sync with ripper.rb.in.
+
Mon Sep 20 03:37:59 2004 Tanaka Akira <akr@m17n.org>
* ext/zlib/zlib.c (gzfile_read_raw): call readpartial at first.
diff --git a/ext/ripper/lib/ripper.rb b/ext/ripper/lib/ripper.rb
index 15a05aaddcf..38b90712004 100644
--- a/ext/ripper/lib/ripper.rb
+++ b/ext/ripper/lib/ripper.rb
@@ -13,7 +13,7 @@ require 'ripper.so'
class Ripper
def Ripper.parse(str, *args)
- new.parse(str, *args)
+ new(str, *args).parse
end
private
diff --git a/ext/ripper/ripper.rb.in b/ext/ripper/ripper.rb.in
index c6fa5542968..fd155cb7bd2 100644
--- a/ext/ripper/ripper.rb.in
+++ b/ext/ripper/ripper.rb.in
@@ -13,7 +13,7 @@ require 'ripper.so'
class Ripper
def Ripper.parse(str, *args)
- new.parse(str, *args)
+ new(str, *args).parse
end
private
diff --git a/keywords b/keywords
index d79af71983e..06f1f011f2a 100644
--- a/keywords
+++ b/keywords
@@ -1,4 +1,7 @@
struct kwtable {char *name; int id[2]; enum lex_state_e state;};
+struct kwtable *rb_reserved_word _((const char *, unsigned int));
+#ifndef RIPPER
+
%%
__LINE__, {k__LINE__, k__LINE__}, EXPR_END
__FILE__, {k__FILE__, k__FILE__}, EXPR_END
@@ -40,3 +43,5 @@ until, {kUNTIL, kUNTIL_MOD}, EXPR_BEG
when, {kWHEN, kWHEN}, EXPR_BEG
while, {kWHILE, kWHILE_MOD}, EXPR_BEG
yield, {kYIELD, kYIELD}, EXPR_ARG
+%%
+#endif
diff --git a/lex.c b/lex.c
index 30c6666d4fa..93b056bdefd 100644
--- a/lex.c
+++ b/lex.c
@@ -1,6 +1,9 @@
/* C code produced by gperf version 2.7.2 */
-/* Command-line: gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' keywords */
+/* Command-line: gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' /home/aamine/c/ruby/keywords */
struct kwtable {char *name; int id[2]; enum lex_state_e state;};
+struct kwtable *rb_reserved_word _((const char *, unsigned int));
+#ifndef RIPPER
+;
#define TOTAL_KEYWORDS 40
#define MIN_WORD_LENGTH 2
@@ -134,3 +137,4 @@ rb_reserved_word (str, len)
}
return 0;
}
+#endif
diff --git a/parse.y b/parse.y
index 0976d367c7f..e749d49cd3b 100644
--- a/parse.y
+++ b/parse.y
@@ -5046,6 +5046,7 @@ parser_heredoc_identifier(parser)
tokfix();
#ifdef RIPPER
+ ripper_dispatch_space(parser);
ripper_dispatch_nonspace(parser, tHEREDOC_BEG);
#endif
len = lex_p - lex_pbeg;