2007-11-13 09:29:49 +03:00
|
|
|
%{
|
2018-01-21 12:59:45 +03:00
|
|
|
struct kwtable {short name, id[2], state;};
|
2007-12-25 07:17:06 +03:00
|
|
|
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
2007-11-13 09:29:49 +03:00
|
|
|
#ifndef RIPPER
|
2022-09-16 09:14:05 +03:00
|
|
|
static const struct kwtable *reserved_word(register const char *str, register size_t len);
|
2009-05-16 04:30:16 +04:00
|
|
|
#define rb_reserved_word(str, len) reserved_word(str, len)
|
2007-11-13 09:29:49 +03:00
|
|
|
%}
|
|
|
|
|
|
|
|
struct kwtable;
|
|
|
|
%%
|
2007-12-21 06:22:22 +03:00
|
|
|
__ENCODING__, {keyword__ENCODING__, keyword__ENCODING__}, EXPR_END
|
2007-11-13 09:29:49 +03:00
|
|
|
__LINE__, {keyword__LINE__, keyword__LINE__}, EXPR_END
|
|
|
|
__FILE__, {keyword__FILE__, keyword__FILE__}, EXPR_END
|
|
|
|
BEGIN, {keyword_BEGIN, keyword_BEGIN}, EXPR_END
|
|
|
|
END, {keyword_END, keyword_END}, EXPR_END
|
2016-03-16 17:10:27 +03:00
|
|
|
alias, {keyword_alias, keyword_alias}, EXPR_FNAME|EXPR_FITEM
|
2007-11-13 09:29:49 +03:00
|
|
|
and, {keyword_and, keyword_and}, EXPR_VALUE
|
|
|
|
begin, {keyword_begin, keyword_begin}, EXPR_BEG
|
|
|
|
break, {keyword_break, keyword_break}, EXPR_MID
|
|
|
|
case, {keyword_case, keyword_case}, EXPR_VALUE
|
|
|
|
class, {keyword_class, keyword_class}, EXPR_CLASS
|
|
|
|
def, {keyword_def, keyword_def}, EXPR_FNAME
|
|
|
|
defined?, {keyword_defined, keyword_defined}, EXPR_ARG
|
|
|
|
do, {keyword_do, keyword_do}, EXPR_BEG
|
|
|
|
else, {keyword_else, keyword_else}, EXPR_BEG
|
|
|
|
elsif, {keyword_elsif, keyword_elsif}, EXPR_VALUE
|
|
|
|
end, {keyword_end, keyword_end}, EXPR_END
|
|
|
|
ensure, {keyword_ensure, keyword_ensure}, EXPR_BEG
|
|
|
|
false, {keyword_false, keyword_false}, EXPR_END
|
|
|
|
for, {keyword_for, keyword_for}, EXPR_VALUE
|
|
|
|
if, {keyword_if, modifier_if}, EXPR_VALUE
|
|
|
|
in, {keyword_in, keyword_in}, EXPR_VALUE
|
|
|
|
module, {keyword_module, keyword_module}, EXPR_VALUE
|
|
|
|
next, {keyword_next, keyword_next}, EXPR_MID
|
|
|
|
nil, {keyword_nil, keyword_nil}, EXPR_END
|
2008-06-25 16:55:47 +04:00
|
|
|
not, {keyword_not, keyword_not}, EXPR_ARG
|
2007-11-13 09:29:49 +03:00
|
|
|
or, {keyword_or, keyword_or}, EXPR_VALUE
|
|
|
|
redo, {keyword_redo, keyword_redo}, EXPR_END
|
|
|
|
rescue, {keyword_rescue, modifier_rescue}, EXPR_MID
|
|
|
|
retry, {keyword_retry, keyword_retry}, EXPR_END
|
|
|
|
return, {keyword_return, keyword_return}, EXPR_MID
|
|
|
|
self, {keyword_self, keyword_self}, EXPR_END
|
|
|
|
super, {keyword_super, keyword_super}, EXPR_ARG
|
|
|
|
then, {keyword_then, keyword_then}, EXPR_BEG
|
|
|
|
true, {keyword_true, keyword_true}, EXPR_END
|
2016-03-16 17:10:27 +03:00
|
|
|
undef, {keyword_undef, keyword_undef}, EXPR_FNAME|EXPR_FITEM
|
2007-11-13 09:29:49 +03:00
|
|
|
unless, {keyword_unless, modifier_unless}, EXPR_VALUE
|
|
|
|
until, {keyword_until, modifier_until}, EXPR_VALUE
|
|
|
|
when, {keyword_when, keyword_when}, EXPR_VALUE
|
|
|
|
while, {keyword_while, modifier_while}, EXPR_VALUE
|
|
|
|
yield, {keyword_yield, keyword_yield}, EXPR_ARG
|
|
|
|
%%
|
|
|
|
#endif
|