mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* keywords: enclose C code in declaration section by %{ and %}.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cebc9bb19d
commit
a30fe695e6
3 changed files with 83 additions and 73 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Jun 15 20:50:02 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* keywords: enclose C code in declaration section by %{ and %}.
|
||||
|
||||
Fri Jun 15 18:56:52 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* signal.c (trap_handler): trap("SIGSEGV", "DEFAULT") may cause wrong
|
||||
|
|
3
keywords
3
keywords
|
@ -1,7 +1,10 @@
|
|||
%{
|
||||
struct kwtable {char *name; int id[2]; enum lex_state_e state;};
|
||||
const struct kwtable *rb_reserved_word _((const char *, unsigned int));
|
||||
#ifndef RIPPER
|
||||
%}
|
||||
|
||||
struct kwtable;
|
||||
%%
|
||||
__LINE__, {keyword__LINE__, keyword__LINE__}, EXPR_END
|
||||
__FILE__, {keyword__FILE__, keyword__FILE__}, EXPR_END
|
||||
|
|
149
lex.c.blt
149
lex.c.blt
|
@ -1,5 +1,5 @@
|
|||
/* C code produced by gperf version 3.0.2 */
|
||||
/* Command-line: gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' keywords */
|
||||
/* Command-line: gperf --output-file=lex.c.tmp -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' keywords */
|
||||
|
||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||
|
@ -29,9 +29,12 @@ error "gperf generated tables don't work with this execution character set. Plea
|
|||
#endif
|
||||
|
||||
#line 1 "keywords"
|
||||
|
||||
struct kwtable {char *name; int id[2]; enum lex_state_e state;};
|
||||
const struct kwtable *rb_reserved_word _((const char *, unsigned int));
|
||||
#ifndef RIPPER
|
||||
#line 7 "keywords"
|
||||
struct kwtable;
|
||||
|
||||
#define TOTAL_KEYWORDS 40
|
||||
#define MIN_WORD_LENGTH 2
|
||||
|
@ -107,88 +110,88 @@ rb_reserved_word (str, len)
|
|||
static const struct kwtable wordlist[] =
|
||||
{
|
||||
{""}, {""}, {""}, {""}, {""}, {""},
|
||||
#line 9 "keywords"
|
||||
#line 12 "keywords"
|
||||
{"END", {keyword_END, keyword_END}, EXPR_END},
|
||||
{""},
|
||||
#line 13 "keywords"
|
||||
{"break", {keyword_break, keyword_break}, EXPR_MID},
|
||||
#line 19 "keywords"
|
||||
{"else", {keyword_else, keyword_else}, EXPR_BEG},
|
||||
#line 29 "keywords"
|
||||
{"nil", {keyword_nil, keyword_nil}, EXPR_END},
|
||||
#line 22 "keywords"
|
||||
{"ensure", {keyword_ensure, keyword_ensure}, EXPR_BEG},
|
||||
#line 21 "keywords"
|
||||
{"end", {keyword_end, keyword_end}, EXPR_END},
|
||||
#line 38 "keywords"
|
||||
{"then", {keyword_then, keyword_then}, EXPR_BEG},
|
||||
#line 30 "keywords"
|
||||
{"not", {keyword_not, keyword_not}, EXPR_VALUE},
|
||||
#line 23 "keywords"
|
||||
{"false", {keyword_false, keyword_false}, EXPR_END},
|
||||
#line 36 "keywords"
|
||||
{"self", {keyword_self, keyword_self}, EXPR_END},
|
||||
#line 20 "keywords"
|
||||
{"elsif", {keyword_elsif, keyword_elsif}, EXPR_VALUE},
|
||||
#line 33 "keywords"
|
||||
{"rescue", {keyword_rescue, modifier_rescue}, EXPR_MID},
|
||||
#line 39 "keywords"
|
||||
{"true", {keyword_true, keyword_true}, EXPR_END},
|
||||
#line 42 "keywords"
|
||||
{"until", {keyword_until, modifier_until}, EXPR_VALUE},
|
||||
#line 41 "keywords"
|
||||
{"unless", {keyword_unless, modifier_unless}, EXPR_VALUE},
|
||||
#line 35 "keywords"
|
||||
{"return", {keyword_return, keyword_return}, EXPR_MID},
|
||||
#line 16 "keywords"
|
||||
{"def", {keyword_def, keyword_def}, EXPR_FNAME},
|
||||
#line 11 "keywords"
|
||||
{"and", {keyword_and, keyword_and}, EXPR_VALUE},
|
||||
#line 18 "keywords"
|
||||
{"do", {keyword_do, keyword_do}, EXPR_BEG},
|
||||
#line 45 "keywords"
|
||||
{"yield", {keyword_yield, keyword_yield}, EXPR_ARG},
|
||||
#line 24 "keywords"
|
||||
{"for", {keyword_for, keyword_for}, EXPR_VALUE},
|
||||
#line 40 "keywords"
|
||||
{"undef", {keyword_undef, keyword_undef}, EXPR_FNAME},
|
||||
#line 31 "keywords"
|
||||
{"or", {keyword_or, keyword_or}, EXPR_VALUE},
|
||||
#line 26 "keywords"
|
||||
{"in", {keyword_in, keyword_in}, EXPR_VALUE},
|
||||
#line 43 "keywords"
|
||||
{"when", {keyword_when, keyword_when}, EXPR_VALUE},
|
||||
#line 34 "keywords"
|
||||
{"retry", {keyword_retry, keyword_retry}, EXPR_END},
|
||||
#line 25 "keywords"
|
||||
{"if", {keyword_if, modifier_if}, EXPR_VALUE},
|
||||
#line 14 "keywords"
|
||||
{"case", {keyword_case, keyword_case}, EXPR_VALUE},
|
||||
{"break", {keyword_break, keyword_break}, EXPR_MID},
|
||||
#line 22 "keywords"
|
||||
{"else", {keyword_else, keyword_else}, EXPR_BEG},
|
||||
#line 32 "keywords"
|
||||
{"redo", {keyword_redo, keyword_redo}, EXPR_END},
|
||||
#line 28 "keywords"
|
||||
{"next", {keyword_next, keyword_next}, EXPR_MID},
|
||||
#line 37 "keywords"
|
||||
{"super", {keyword_super, keyword_super}, EXPR_ARG},
|
||||
{"nil", {keyword_nil, keyword_nil}, EXPR_END},
|
||||
#line 25 "keywords"
|
||||
{"ensure", {keyword_ensure, keyword_ensure}, EXPR_BEG},
|
||||
#line 24 "keywords"
|
||||
{"end", {keyword_end, keyword_end}, EXPR_END},
|
||||
#line 41 "keywords"
|
||||
{"then", {keyword_then, keyword_then}, EXPR_BEG},
|
||||
#line 33 "keywords"
|
||||
{"not", {keyword_not, keyword_not}, EXPR_VALUE},
|
||||
#line 26 "keywords"
|
||||
{"false", {keyword_false, keyword_false}, EXPR_END},
|
||||
#line 39 "keywords"
|
||||
{"self", {keyword_self, keyword_self}, EXPR_END},
|
||||
#line 23 "keywords"
|
||||
{"elsif", {keyword_elsif, keyword_elsif}, EXPR_VALUE},
|
||||
#line 36 "keywords"
|
||||
{"rescue", {keyword_rescue, modifier_rescue}, EXPR_MID},
|
||||
#line 42 "keywords"
|
||||
{"true", {keyword_true, keyword_true}, EXPR_END},
|
||||
#line 45 "keywords"
|
||||
{"until", {keyword_until, modifier_until}, EXPR_VALUE},
|
||||
#line 44 "keywords"
|
||||
{"unless", {keyword_unless, modifier_unless}, EXPR_VALUE},
|
||||
#line 38 "keywords"
|
||||
{"return", {keyword_return, keyword_return}, EXPR_MID},
|
||||
#line 19 "keywords"
|
||||
{"def", {keyword_def, keyword_def}, EXPR_FNAME},
|
||||
#line 14 "keywords"
|
||||
{"and", {keyword_and, keyword_and}, EXPR_VALUE},
|
||||
#line 21 "keywords"
|
||||
{"do", {keyword_do, keyword_do}, EXPR_BEG},
|
||||
#line 48 "keywords"
|
||||
{"yield", {keyword_yield, keyword_yield}, EXPR_ARG},
|
||||
#line 27 "keywords"
|
||||
{"module", {keyword_module, keyword_module}, EXPR_VALUE},
|
||||
#line 12 "keywords"
|
||||
{"begin", {keyword_begin, keyword_begin}, EXPR_BEG},
|
||||
#line 6 "keywords"
|
||||
{"__LINE__", {keyword__LINE__, keyword__LINE__}, EXPR_END},
|
||||
#line 7 "keywords"
|
||||
{"__FILE__", {keyword__FILE__, keyword__FILE__}, EXPR_END},
|
||||
#line 8 "keywords"
|
||||
{"BEGIN", {keyword_BEGIN, keyword_BEGIN}, EXPR_END},
|
||||
{"for", {keyword_for, keyword_for}, EXPR_VALUE},
|
||||
#line 43 "keywords"
|
||||
{"undef", {keyword_undef, keyword_undef}, EXPR_FNAME},
|
||||
#line 34 "keywords"
|
||||
{"or", {keyword_or, keyword_or}, EXPR_VALUE},
|
||||
#line 29 "keywords"
|
||||
{"in", {keyword_in, keyword_in}, EXPR_VALUE},
|
||||
#line 46 "keywords"
|
||||
{"when", {keyword_when, keyword_when}, EXPR_VALUE},
|
||||
#line 37 "keywords"
|
||||
{"retry", {keyword_retry, keyword_retry}, EXPR_END},
|
||||
#line 28 "keywords"
|
||||
{"if", {keyword_if, modifier_if}, EXPR_VALUE},
|
||||
#line 17 "keywords"
|
||||
{"defined?", {keyword_defined, keyword_defined}, EXPR_ARG},
|
||||
{"case", {keyword_case, keyword_case}, EXPR_VALUE},
|
||||
#line 35 "keywords"
|
||||
{"redo", {keyword_redo, keyword_redo}, EXPR_END},
|
||||
#line 31 "keywords"
|
||||
{"next", {keyword_next, keyword_next}, EXPR_MID},
|
||||
#line 40 "keywords"
|
||||
{"super", {keyword_super, keyword_super}, EXPR_ARG},
|
||||
#line 30 "keywords"
|
||||
{"module", {keyword_module, keyword_module}, EXPR_VALUE},
|
||||
#line 15 "keywords"
|
||||
{"begin", {keyword_begin, keyword_begin}, EXPR_BEG},
|
||||
#line 9 "keywords"
|
||||
{"__LINE__", {keyword__LINE__, keyword__LINE__}, EXPR_END},
|
||||
#line 10 "keywords"
|
||||
{"__FILE__", {keyword__FILE__, keyword__FILE__}, EXPR_END},
|
||||
#line 11 "keywords"
|
||||
{"BEGIN", {keyword_BEGIN, keyword_BEGIN}, EXPR_END},
|
||||
#line 20 "keywords"
|
||||
{"defined?", {keyword_defined, keyword_defined}, EXPR_ARG},
|
||||
#line 13 "keywords"
|
||||
{"alias", {keyword_alias, keyword_alias}, EXPR_FNAME},
|
||||
{""}, {""},
|
||||
#line 15 "keywords"
|
||||
#line 18 "keywords"
|
||||
{"class", {keyword_class, keyword_class}, EXPR_CLASS},
|
||||
{""}, {""},
|
||||
#line 44 "keywords"
|
||||
#line 47 "keywords"
|
||||
{"while", {keyword_while, modifier_while}, EXPR_VALUE}
|
||||
};
|
||||
|
||||
|
@ -206,6 +209,6 @@ rb_reserved_word (str, len)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
#line 46 "keywords"
|
||||
#line 49 "keywords"
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue