Ruby  2.4.2p198(2017-09-14revision59899)
Data Structures | Macros | Functions | Variables
lex.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  kwtable
 
struct  stringpool_t
 

Macros

#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 kwtablerb_reserved_word (const char *, unsigned int)
 
static const struct kwtablereserved_word (const char *, unsigned int)
 
static unsigned int hash (const char *str, unsigned int len)
 

Variables

static const struct stringpool_t stringpool_contents
 

Macro Definition Documentation

◆ MAX_HASH_VALUE

#define MAX_HASH_VALUE   50

Definition at line 45 of file lex.c.

◆ MAX_WORD_LENGTH

#define MAX_WORD_LENGTH   12

Definition at line 43 of file lex.c.

Referenced by reg_named_capture_assign_iter().

◆ MIN_HASH_VALUE

#define MIN_HASH_VALUE   8

Definition at line 44 of file lex.c.

◆ MIN_WORD_LENGTH

#define MIN_WORD_LENGTH   2

Definition at line 42 of file lex.c.

Referenced by rb_reserved_word().

◆ rb_reserved_word

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

Definition at line 37 of file lex.c.

◆ stringpool

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

Definition at line 190 of file lex.c.

Referenced by rb_reserved_word().

◆ TOTAL_KEYWORDS

#define TOTAL_KEYWORDS   41

Definition at line 41 of file lex.c.

Function Documentation

◆ hash()

static unsigned int hash ( const char *  str,
unsigned int  len 
)
static

Definition at line 54 of file lex.c.

References asso_values, hval, and len.

Referenced by rb_reserved_word().

◆ rb_reserved_word()

const struct kwtable* rb_reserved_word ( const char *  str,
unsigned int  len 
)

◆ reserved_word()

static const struct kwtable* reserved_word ( const char *  ,
unsigned  int 
)
static

Referenced by rb_reserved_word().

Variable Documentation

◆ stringpool_contents

const struct stringpool_t stringpool_contents
static

Definition at line 146 of file lex.c.