Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Data Structures | Macros | Functions
lex.c File Reference

Go to the source code of this file.

## Data Structures
struct | kwtable
struct | stringpool_t

## Macros
#define | gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)
#define | rb_reserved_word(str, len) reserved_word(str, len)
#define | TOTAL_KEYWORDS 41
#define | MIN_WORD_LENGTH 2
#define | MAX_WORD_LENGTH 12
#define | MIN_HASH_VALUE 8
#define | MAX_HASH_VALUE 50
#define | stringpool ((const char *) &stringpool_contents)

## Functions
const struct kwtable * | rb_reserved_word (const char *, unsigned int)
const struct kwtable * | rb_reserved_word (register const char *str, register size_t len)

## Macro Definition Documentation

## ◆ gperf_offsetof

#define gperf_offsetof | ( |  | s,
|  |  | n
| ) |  | (short)offsetof(struct s##_t, s##_str##n)

Definition at line 31 of file lex.c.

## ◆ MAX_HASH_VALUE

#define MAX_HASH_VALUE 50

Definition at line 46 of file lex.c.

## ◆ MAX_WORD_LENGTH

#define MAX_WORD_LENGTH 12

Definition at line 44 of file lex.c.

## ◆ MIN_HASH_VALUE

#define MIN_HASH_VALUE 8

Definition at line 45 of file lex.c.

## ◆ MIN_WORD_LENGTH

#define MIN_WORD_LENGTH 2

Definition at line 43 of file lex.c.

## ◆ rb_reserved_word

#define rb_reserved_word | ( |  | str,
|  |  | len
| ) |  | reserved_word(str, len)

Definition at line 38 of file lex.c.

## ◆ stringpool

#define stringpool ((const char *) &stringpool_contents)

Definition at line 191 of file lex.c.

## ◆ TOTAL_KEYWORDS

#define TOTAL_KEYWORDS 41

Definition at line 42 of file lex.c.

## Function Documentation

## ◆ rb_reserved_word() [1/2]

const struct kwtable* rb_reserved_word | ( | const char * | ,
|  | unsigned int |
| ) |  |

Definition at line 19218 of file ripper.c.

## ◆ rb_reserved_word() [2/2]

const struct kwtable* rb_reserved_word | ( | register const char * | str,
|  | register size_t | len
| ) |  |

Definition at line 193 of file lex.c.

References EXPR_VALUE, gperf_offsetof, key, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_alias, keyword_and, keyword_begin, keyword_BEGIN, keyword_break, keyword_case, keyword_class, keyword_def, keyword_defined, keyword_do, keyword_else, keyword_elsif, keyword_end, keyword_END, keyword_ensure, keyword_false, keyword_for, keyword_if, keyword_in, keyword_module, keyword_next, keyword_nil, keyword_not, keyword_or, keyword_redo, keyword_rescue, keyword_retry, keyword_return, keyword_self, keyword_super, keyword_then, keyword_true, keyword_undef, keyword_unless, keyword_until, keyword_when, keyword_while, keyword_yield, MIN_WORD_LENGTH, modifier_if, modifier_rescue, modifier_unless, modifier_until, modifier_while, and stringpool.