Ruby  1.9.3p551(2014-11-13revision48407)
Data Structures | Macros | Functions | Variables
lex.c File Reference

Go to the source code of this file.

Data Structures

struct  kwtable
 

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
 

Functions

struct kwtablerb_reserved_word (const char *, unsigned int)
 
static struct kwtablereserved_word (const char *, unsigned int)
 
 switch (hval)
 
 if (len<=MAX_WORD_LENGTH &&len >=MIN_WORD_LENGTH)
 

Variables

static unsigned int register
const char * 
str
 
register unsigned int len
 
register int hval = len
 
return hval asso_values [(unsigned char) str[len-1]]
 
 return
 

Macro Definition Documentation

#define MAX_HASH_VALUE   50

Definition at line 45 of file lex.c.

#define MAX_WORD_LENGTH   12

Definition at line 43 of file lex.c.

#define MIN_HASH_VALUE   8

Definition at line 44 of file lex.c.

#define MIN_WORD_LENGTH   2

Definition at line 42 of file lex.c.

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

Definition at line 37 of file lex.c.

Referenced by parser_yylex(), and reg_named_capture_assign_iter().

#define TOTAL_KEYWORDS   41

Definition at line 41 of file lex.c.

Function Documentation

if ( len<=MAX_WORD_LENGTH &&len >=  MIN_WORD_LENGTH)

Definition at line 203 of file lex.c.

References hash, key, kwtable::name, and s.

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

Definition at line 16570 of file ripper.c.

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

Referenced by rb_reserved_word().

switch ( hval  )

Definition at line 91 of file lex.c.

Variable Documentation

return hval asso_values[(unsigned char) str[len-1]]

Definition at line 101 of file lex.c.

register int hval = len

Definition at line 89 of file lex.c.

Referenced by cdhash_hash(), hash_i(), rb_any_hash(), rb_hash(), rb_str_hash_m(), recursive_hash(), and strcasehash().

register unsigned int len

Definition at line 58 of file lex.c.

return

Definition at line 215 of file lex.c.

struct kwtable *register const char * str
static

Definition at line 57 of file lex.c.