mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
44abd80865
commit
0ad4ae91ea
6 changed files with 26 additions and 3 deletions
13
ChangeLog
13
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.
|
||||
|
|
|
@ -13,7 +13,7 @@ require 'ripper.so'
|
|||
|
||||
class Ripper
|
||||
def Ripper.parse(str, *args)
|
||||
new.parse(str, *args)
|
||||
new(str, *args).parse
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -13,7 +13,7 @@ require 'ripper.so'
|
|||
|
||||
class Ripper
|
||||
def Ripper.parse(str, *args)
|
||||
new.parse(str, *args)
|
||||
new(str, *args).parse
|
||||
end
|
||||
|
||||
private
|
||||
|
|
5
keywords
5
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
|
||||
|
|
6
lex.c
6
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
|
||||
|
|
1
parse.y
1
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;
|
||||
|
|
Loading…
Reference in a new issue