#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/encoding.h"
#include "node.h"
#include "parse.h"
#include "id.h"
#include "regenc.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include "id.c"
#include "ruby/regex.h"
#include "ruby/util.h"
#include "lex.c"
Go to the source code of this file.
Data Structures | |
struct | vtable |
struct | local_vars |
struct | token_info |
struct | parser_params |
union | yyalloc |
struct | magic_comment |
struct | reg_named_capture_assign_t |
struct | symbols |
Defines | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "2.4.2" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 1 |
#define | YYPUSH 0 |
#define | YYPULL 1 |
#define | YYLSP_NEEDED 0 |
#define | YYDEBUG 1 |
#define | YYERROR_VERBOSE 1 |
#define | YYSTACK_USE_ALLOCA 0 |
#define | numberof(array) (int)(sizeof(array) / sizeof((array)[0])) |
#define | YYMALLOC(size) rb_parser_malloc(parser, size) |
#define | YYREALLOC(ptr, size) rb_parser_realloc(parser, ptr, size) |
#define | YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size) |
#define | YYFREE(ptr) rb_parser_free(parser, ptr) |
#define | malloc YYMALLOC |
#define | realloc YYREALLOC |
#define | calloc YYCALLOC |
#define | free YYFREE |
#define | REGISTER_SYMID(id, name) register_symid(id, name, strlen(name), enc) |
#define | is_notop_id(id) ((id)>tLAST_TOKEN) |
#define | is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) |
#define | is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) |
#define | is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) |
#define | is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) |
#define | is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) |
#define | is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) |
#define | is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) |
#define | is_asgn_or_id(id) |
#define | BITSTACK_PUSH(stack, n) (stack = (stack<<1)|((n)&1)) |
#define | BITSTACK_POP(stack) (stack = stack >> 1) |
#define | BITSTACK_LEXPOP(stack) (stack = (stack >> 1) | (stack & 1)) |
#define | BITSTACK_SET_P(stack) (stack&1) |
#define | COND_PUSH(n) BITSTACK_PUSH(cond_stack, n) |
#define | COND_POP() BITSTACK_POP(cond_stack) |
#define | COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) |
#define | COND_P() BITSTACK_SET_P(cond_stack) |
#define | CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, n) |
#define | CMDARG_POP() BITSTACK_POP(cmdarg_stack) |
#define | CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) |
#define | CMDARG_P() BITSTACK_SET_P(cmdarg_stack) |
#define | DVARS_INHERIT ((void*)1) |
#define | DVARS_TOPSCOPE NULL |
#define | DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) |
#define | POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) |
#define | VTBL_DEBUG 0 |
#define | UTF8_ENC() |
#define | STR_NEW(p, n) rb_enc_str_new((p),(n),parser->enc) |
#define | STR_NEW0() rb_enc_str_new(0,0,parser->enc) |
#define | STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) |
#define | STR_NEW3(p, n, e, func) parser_str_new((p),(n),(e),(func),parser->enc) |
#define | ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) |
#define | TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) |
#define | yyerror(msg) parser_yyerror(parser, msg) |
#define | YYLEX_PARAM parser |
#define | lex_strterm (parser->parser_lex_strterm) |
#define | lex_state (parser->parser_lex_state) |
#define | cond_stack (parser->parser_cond_stack) |
#define | cmdarg_stack (parser->parser_cmdarg_stack) |
#define | class_nest (parser->parser_class_nest) |
#define | paren_nest (parser->parser_paren_nest) |
#define | lpar_beg (parser->parser_lpar_beg) |
#define | in_single (parser->parser_in_single) |
#define | in_def (parser->parser_in_def) |
#define | compile_for_eval (parser->parser_compile_for_eval) |
#define | cur_mid (parser->parser_cur_mid) |
#define | in_defined (parser->parser_in_defined) |
#define | tokenbuf (parser->parser_tokenbuf) |
#define | tokidx (parser->parser_tokidx) |
#define | toksiz (parser->parser_toksiz) |
#define | lex_input (parser->parser_lex_input) |
#define | lex_lastline (parser->parser_lex_lastline) |
#define | lex_nextline (parser->parser_lex_nextline) |
#define | lex_pbeg (parser->parser_lex_pbeg) |
#define | lex_p (parser->parser_lex_p) |
#define | lex_pend (parser->parser_lex_pend) |
#define | heredoc_end (parser->parser_heredoc_end) |
#define | command_start (parser->parser_command_start) |
#define | deferred_nodes (parser->parser_deferred_nodes) |
#define | lex_gets_ptr (parser->parser_lex_gets_ptr) |
#define | lex_gets (parser->parser_lex_gets) |
#define | lvtbl (parser->parser_lvtbl) |
#define | ruby__end__seen (parser->parser_ruby__end__seen) |
#define | ruby_sourceline (parser->parser_ruby_sourceline) |
#define | ruby_sourcefile (parser->parser_ruby_sourcefile) |
#define | yydebug (parser->parser_yydebug) |
#define | ruby_eval_tree (parser->parser_eval_tree) |
#define | ruby_eval_tree_begin (parser->parser_eval_tree_begin) |
#define | ruby_debug_lines (parser->debug_lines) |
#define | ruby_coverage (parser->coverage) |
#define | yyparse ruby_yyparse |
#define | rb_node_newnode(type, a1, a2, a3) node_newnode(parser, type, a1, a2, a3) |
#define | cond(node) cond_gen(parser, node) |
#define | logop(type, node1, node2) logop_gen(parser, type, node1, node2) |
#define | value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) |
#define | void_expr0(node) void_expr_gen(parser, (node)) |
#define | void_expr(node) void_expr0((node) = remove_begin(node)) |
#define | void_stmts(node) void_stmts_gen(parser, node) |
#define | reduce_nodes(n) reduce_nodes_gen(parser,n) |
#define | block_dup_check(n1, n2) block_dup_check_gen(parser,n1,n2) |
#define | block_append(h, t) block_append_gen(parser,h,t) |
#define | list_append(l, i) list_append_gen(parser,l,i) |
#define | list_concat(h, t) list_concat_gen(parser,h,t) |
#define | arg_append(h, t) arg_append_gen(parser,h,t) |
#define | arg_concat(h, t) arg_concat_gen(parser,h,t) |
#define | literal_concat(h, t) literal_concat_gen(parser,h,t) |
#define | new_evstr(n) new_evstr_gen(parser,n) |
#define | evstr2dstr(n) evstr2dstr_gen(parser,n) |
#define | call_bin_op(recv, id, arg1) call_bin_op_gen(parser, recv,id,arg1) |
#define | call_uni_op(recv, id) call_uni_op_gen(parser, recv,id) |
#define | new_args(f, o, r, p, b) new_args_gen(parser, f,o,r,p,b) |
#define | ret_args(node) ret_args_gen(parser, node) |
#define | new_yield(node) new_yield_gen(parser, node) |
#define | gettable(id) gettable_gen(parser,id) |
#define | assignable(id, node) assignable_gen(parser, id, node) |
#define | aryset(node1, node2) aryset_gen(parser, node1, node2) |
#define | attrset(node, id) attrset_gen(parser, node, id) |
#define | rb_backref_error(n) rb_backref_error_gen(parser,n) |
#define | node_assign(node1, node2) node_assign_gen(parser, node1, node2) |
#define | match_op(node1, node2) match_op_gen(parser, node1, node2) |
#define | local_tbl() local_tbl_gen(parser) |
#define | reg_compile(str, options) reg_compile_gen(parser, str, options) |
#define | reg_fragment_setenc(str, options) reg_fragment_setenc_gen(parser, str, options) |
#define | reg_fragment_check(str, options) reg_fragment_check_gen(parser, str, options) |
#define | reg_named_capture_assign(regexp, match) reg_named_capture_assign_gen(parser,regexp,match) |
#define | get_id(id) (id) |
#define | get_value(val) (val) |
#define | formal_argument(id) formal_argument_gen(parser, id) |
#define | shadowing_lvar(name) shadowing_lvar_gen(parser, name) |
#define | new_bv(id) new_bv_gen(parser, id) |
#define | local_push(top) local_push_gen(parser,top) |
#define | local_pop() local_pop_gen(parser) |
#define | local_var(id) local_var_gen(parser, id); |
#define | arg_var(id) arg_var_gen(parser, id) |
#define | local_id(id) local_id_gen(parser, id) |
#define | internal_id() internal_id_gen(parser) |
#define | dyna_push() dyna_push_gen(parser) |
#define | dyna_pop(node) dyna_pop_gen(parser, node) |
#define | dyna_in_block() dyna_in_block_gen(parser) |
#define | dyna_var(id) local_var(id) |
#define | dvar_defined(id) dvar_defined_gen(parser, id) |
#define | dvar_curr(id) dvar_curr_gen(parser, id) |
#define | lvar_defined(id) lvar_defined_gen(parser, id) |
#define | RE_OPTION_ONCE (1<<16) |
#define | RE_OPTION_ENCODING_SHIFT 8 |
#define | RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) |
#define | RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) |
#define | RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) |
#define | RE_OPTION_MASK 0xff |
#define | RE_OPTION_ARG_ENCODING_NONE 32 |
#define | NODE_STRTERM NODE_ZARRAY |
#define | NODE_HEREDOC NODE_ARRAY |
#define | SIGN_EXTEND(x, n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) |
#define | nd_func u1.id |
#define | nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) |
#define | nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) |
#define | nd_nest u3.cnt |
#define | ifndef_ripper(x) x |
#define | rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt) |
#define | rb_warnI(fmt, a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) |
#define | rb_warnS(fmt, a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) |
#define | rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt) |
#define | rb_warningS(fmt, a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt, a) |
#define | compile_error parser->nerr++,rb_compile_error |
#define | PARSER_ARG ruby_sourcefile, ruby_sourceline, |
#define | token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, token) : (void)0) |
#define | token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, token) : (void)0) |
#define | YYDEBUG 0 |
#define | YYERROR_VERBOSE 0 |
#define | YYTOKEN_TABLE 0 |
#define | YYTOKENTYPE |
#define | YYSIZE_T unsigned int |
#define | YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define | YY_(msgid) msgid |
#define | YYUSE(e) ((void) (e)) |
#define | YYID(n) (n) |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | YYMALLOC malloc |
#define | YYFREE free |
#define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY(To, From, Count) |
#define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
#define | YYFINAL 3 |
#define | YYLAST 10410 |
#define | YYNTOKENS 148 |
#define | YYNNTS 172 |
#define | YYNRULES 565 |
#define | YYNSTATES 975 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 375 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -778 |
#define | YYTABLE_NINF -566 |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYFAIL goto yyerrlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYRHSLOC(Rhs, K) ((Rhs)[K]) |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YY_LOCATION_PRINT(File, Loc) ((void) 0) |
#define | YYLEX yylex (&yylval) |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Type, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
#define | yylval (*((YYSTYPE*)(parser->parser_yylval))) |
#define | nextc() parser_nextc(parser) |
#define | pushback(c) parser_pushback(parser, c) |
#define | newtok() parser_newtok(parser) |
#define | tokspace(n) parser_tokspace(parser, n) |
#define | tokadd(c) parser_tokadd(parser, c) |
#define | tok_hex(numlen) parser_tok_hex(parser, numlen) |
#define | read_escape(flags, e) parser_read_escape(parser, flags, e) |
#define | tokadd_escape(e) parser_tokadd_escape(parser, e) |
#define | regx_options() parser_regx_options(parser) |
#define | tokadd_string(f, t, p, n, e) parser_tokadd_string(parser,f,t,p,n,e) |
#define | parse_string(n) parser_parse_string(parser,n) |
#define | tokaddmbc(c, enc) parser_tokaddmbc(parser, c, enc) |
#define | here_document(n) parser_here_document(parser,n) |
#define | heredoc_identifier() parser_heredoc_identifier(parser) |
#define | heredoc_restore(n) parser_heredoc_restore(parser,n) |
#define | whole_match_p(e, l, i) parser_whole_match_p(parser,e,l,i) |
#define | set_yylval_str(x) yylval.node = NEW_STR(x) |
#define | set_yylval_num(x) yylval.num = x |
#define | set_yylval_id(x) yylval.id = x |
#define | set_yylval_name(x) yylval.id = x |
#define | set_yylval_literal(x) yylval.node = NEW_LIT(x) |
#define | set_yylval_node(x) yylval.node = x |
#define | yylval_id() yylval.id |
#define | ripper_flush(p) (void)(p) |
#define | SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) |
#define | parser_encoding_name() (parser->enc->name) |
#define | parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) |
#define | parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) |
#define | is_identchar(p, e, enc) (rb_enc_isalnum(*p,enc) || (*p) == '_' || !ISASCII(*p)) |
#define | parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) |
#define | parser_isascii() ISASCII(*(lex_p-1)) |
#define | STR_FUNC_ESCAPE 0x01 |
#define | STR_FUNC_EXPAND 0x02 |
#define | STR_FUNC_REGEXP 0x04 |
#define | STR_FUNC_QWORDS 0x08 |
#define | STR_FUNC_SYMBOL 0x10 |
#define | STR_FUNC_INDENT 0x20 |
#define | lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend) |
#define | peek(c) (lex_p < lex_pend && (c) == *lex_p) |
#define | was_bol() (lex_p == lex_pbeg + 1) |
#define | tokfix() (tokenbuf[tokidx]='\0') |
#define | tok() tokenbuf |
#define | toklen() tokidx |
#define | toklast() (tokidx>0?tokenbuf[tokidx-1]:0) |
#define | tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) |
#define | ESCAPE_CONTROL 1 |
#define | ESCAPE_META 2 |
#define | tokadd_mbchar(c) parser_tokadd_mbchar(parser, c) |
#define | mixed_error(enc1, enc2) |
#define | mixed_escape(beg, enc1, enc2) |
#define | NEW_STRTERM(func, term, paren) rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) |
#define | arg_ambiguous() (arg_ambiguous_gen(parser), 1) |
#define | str_copy(_s, _p, _n) |
#define | IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) |
#define | IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN) |
#define | IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) |
#define | IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) |
#define | ambiguous_operator(op, syn) |
#define | warn_balanced(op, syn) |
#define | no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) |
#define | parser_warning(node, mesg) parser_warning(parser, node, mesg) |
#define | parser_warn(node, mesg) parser_warn(parser, node, mesg) |
#define | assignable_result(x) x |
#define | subnodes(n1, n2) |
#define | op_tbl_count numberof(op_tbl) |
#define | ENABLE_SELECTOR_NAMESPACE 0 |
Typedefs | |
typedef VALUE | stack_type |
typedef struct token_info | token_info |
typedef unsigned char | yytype_uint8 |
typedef short int | yytype_int8 |
typedef unsigned short int | yytype_uint16 |
typedef short int | yytype_int16 |
typedef long(* | rb_magic_comment_length_t )(struct parser_params *parser, const char *name, long len) |
typedef void(* | rb_magic_comment_setter_t )(struct parser_params *parser, const char *name, const char *val) |
Enumerations | |
enum | lex_state_e { EXPR_BEG, EXPR_END, EXPR_ENDARG, EXPR_ENDFN, EXPR_ARG, EXPR_CMDARG, EXPR_MID, EXPR_FNAME, EXPR_DOT, EXPR_CLASS, EXPR_VALUE, EXPR_MAX_STATE, EXPR_BEG, EXPR_END, EXPR_ENDARG, EXPR_ENDFN, EXPR_ARG, EXPR_CMDARG, EXPR_MID, EXPR_FNAME, EXPR_DOT, EXPR_CLASS, EXPR_VALUE, EXPR_MAX_STATE } |
enum | yytokentype { keyword_class = 258, keyword_module = 259, keyword_def = 260, keyword_undef = 261, keyword_begin = 262, keyword_rescue = 263, keyword_ensure = 264, keyword_end = 265, keyword_if = 266, keyword_unless = 267, keyword_then = 268, keyword_elsif = 269, keyword_else = 270, keyword_case = 271, keyword_when = 272, keyword_while = 273, keyword_until = 274, keyword_for = 275, keyword_break = 276, keyword_next = 277, keyword_redo = 278, keyword_retry = 279, keyword_in = 280, keyword_do = 281, keyword_do_cond = 282, keyword_do_block = 283, keyword_do_LAMBDA = 284, keyword_return = 285, keyword_yield = 286, keyword_super = 287, keyword_self = 288, keyword_nil = 289, keyword_true = 290, keyword_false = 291, keyword_and = 292, keyword_or = 293, keyword_not = 294, modifier_if = 295, modifier_unless = 296, modifier_while = 297, modifier_until = 298, modifier_rescue = 299, keyword_alias = 300, keyword_defined = 301, keyword_BEGIN = 302, keyword_END = 303, keyword__LINE__ = 304, keyword__FILE__ = 305, keyword__ENCODING__ = 306, tIDENTIFIER = 307, tFID = 308, tGVAR = 309, tIVAR = 310, tCONSTANT = 311, tCVAR = 312, tLABEL = 313, tINTEGER = 314, tFLOAT = 315, tSTRING_CONTENT = 316, tCHAR = 317, tNTH_REF = 318, tBACK_REF = 319, tREGEXP_END = 320, tUPLUS = 321, tUMINUS = 322, tPOW = 323, tCMP = 324, tEQ = 325, tEQQ = 326, tNEQ = 327, tGEQ = 328, tLEQ = 329, tANDOP = 330, tOROP = 331, tMATCH = 332, tNMATCH = 333, tDOT2 = 334, tDOT3 = 335, tAREF = 336, tASET = 337, tLSHFT = 338, tRSHFT = 339, tCOLON2 = 340, tCOLON3 = 341, tOP_ASGN = 342, tASSOC = 343, tLPAREN = 344, tLPAREN_ARG = 345, tRPAREN = 346, tLBRACK = 347, tLBRACE = 348, tLBRACE_ARG = 349, tSTAR = 350, tAMPER = 351, tLAMBDA = 352, tSYMBEG = 353, tSTRING_BEG = 354, tXSTRING_BEG = 355, tREGEXP_BEG = 356, tWORDS_BEG = 357, tQWORDS_BEG = 358, tSTRING_DBEG = 359, tSTRING_DVAR = 360, tSTRING_END = 361, tLAMBEG = 362, tLOWEST = 363, tUMINUS_NUM = 364, idNULL = 365, idRespond_to = 366, idIFUNC = 367, idCFUNC = 368, id_core_set_method_alias = 369, id_core_set_variable_alias = 370, id_core_undef_method = 371, id_core_define_method = 372, id_core_define_singleton_method = 373, id_core_set_postexe = 374, tLAST_TOKEN = 375, YAML_ANCHOR = 258, YAML_ALIAS = 259, YAML_TRANSFER = 260, YAML_TAGURI = 261, YAML_ITRANSFER = 262, YAML_WORD = 263, YAML_PLAIN = 264, YAML_BLOCK = 265, YAML_DOCSEP = 266, YAML_IOPEN = 267, YAML_INDENT = 268, YAML_IEND = 269, YAML_ANCHOR = 258, YAML_ALIAS = 259, YAML_TRANSFER = 260, YAML_TAGURI = 261, YAML_ITRANSFER = 262, YAML_WORD = 263, YAML_PLAIN = 264, YAML_BLOCK = 265, YAML_DOCSEP = 266, YAML_IOPEN = 267, YAML_INDENT = 268, YAML_IEND = 269, keyword_class = 258, keyword_module = 259, keyword_def = 260, keyword_undef = 261, keyword_begin = 262, keyword_rescue = 263, keyword_ensure = 264, keyword_end = 265, keyword_if = 266, keyword_unless = 267, keyword_then = 268, keyword_elsif = 269, keyword_else = 270, keyword_case = 271, keyword_when = 272, keyword_while = 273, keyword_until = 274, keyword_for = 275, keyword_break = 276, keyword_next = 277, keyword_redo = 278, keyword_retry = 279, keyword_in = 280, keyword_do = 281, keyword_do_cond = 282, keyword_do_block = 283, keyword_do_LAMBDA = 284, keyword_return = 285, keyword_yield = 286, keyword_super = 287, keyword_self = 288, keyword_nil = 289, keyword_true = 290, keyword_false = 291, keyword_and = 292, keyword_or = 293, keyword_not = 294, modifier_if = 295, modifier_unless = 296, modifier_while = 297, modifier_until = 298, modifier_rescue = 299, keyword_alias = 300, keyword_defined = 301, keyword_BEGIN = 302, keyword_END = 303, keyword__LINE__ = 304, keyword__FILE__ = 305, keyword__ENCODING__ = 306, tIDENTIFIER = 307, tFID = 308, tGVAR = 309, tIVAR = 310, tCONSTANT = 311, tCVAR = 312, tLABEL = 313, tINTEGER = 314, tFLOAT = 315, tSTRING_CONTENT = 316, tCHAR = 317, tNTH_REF = 318, tBACK_REF = 319, tREGEXP_END = 320, tUPLUS = 321, tUMINUS = 322, tPOW = 323, tCMP = 324, tEQ = 325, tEQQ = 326, tNEQ = 327, tGEQ = 328, tLEQ = 329, tANDOP = 330, tOROP = 331, tMATCH = 332, tNMATCH = 333, tDOT2 = 334, tDOT3 = 335, tAREF = 336, tASET = 337, tLSHFT = 338, tRSHFT = 339, tCOLON2 = 340, tCOLON3 = 341, tOP_ASGN = 342, tASSOC = 343, tLPAREN = 344, tLPAREN_ARG = 345, tRPAREN = 346, tLBRACK = 347, tLBRACE = 348, tLBRACE_ARG = 349, tSTAR = 350, tAMPER = 351, tLAMBDA = 352, tSYMBEG = 353, tSTRING_BEG = 354, tXSTRING_BEG = 355, tREGEXP_BEG = 356, tWORDS_BEG = 357, tQWORDS_BEG = 358, tSTRING_DBEG = 359, tSTRING_DVAR = 360, tSTRING_END = 361, tLAMBEG = 362, tLOWEST = 363, tUMINUS_NUM = 364, idNULL = 365, idRespond_to = 366, idIFUNC = 367, idCFUNC = 368, id_core_set_method_alias = 369, id_core_set_variable_alias = 370, id_core_undef_method = 371, id_core_define_method = 372, id_core_define_singleton_method = 373, id_core_set_postexe = 374, tLAST_TOKEN = 375, keyword_class = 258, keyword_module = 259, keyword_def = 260, keyword_undef = 261, keyword_begin = 262, keyword_rescue = 263, keyword_ensure = 264, keyword_end = 265, keyword_if = 266, keyword_unless = 267, keyword_then = 268, keyword_elsif = 269, keyword_else = 270, keyword_case = 271, keyword_when = 272, keyword_while = 273, keyword_until = 274, keyword_for = 275, keyword_break = 276, keyword_next = 277, keyword_redo = 278, keyword_retry = 279, keyword_in = 280, keyword_do = 281, keyword_do_cond = 282, keyword_do_block = 283, keyword_do_LAMBDA = 284, keyword_return = 285, keyword_yield = 286, keyword_super = 287, keyword_self = 288, keyword_nil = 289, keyword_true = 290, keyword_false = 291, keyword_and = 292, keyword_or = 293, keyword_not = 294, modifier_if = 295, modifier_unless = 296, modifier_while = 297, modifier_until = 298, modifier_rescue = 299, keyword_alias = 300, keyword_defined = 301, keyword_BEGIN = 302, keyword_END = 303, keyword__LINE__ = 304, keyword__FILE__ = 305, keyword__ENCODING__ = 306, tIDENTIFIER = 307, tFID = 308, tGVAR = 309, tIVAR = 310, tCONSTANT = 311, tCVAR = 312, tLABEL = 313, tINTEGER = 314, tFLOAT = 315, tSTRING_CONTENT = 316, tCHAR = 317, tNTH_REF = 318, tBACK_REF = 319, tREGEXP_END = 320, tUPLUS = 321, tUMINUS = 322, tPOW = 323, tCMP = 324, tEQ = 325, tEQQ = 326, tNEQ = 327, tGEQ = 328, tLEQ = 329, tANDOP = 330, tOROP = 331, tMATCH = 332, tNMATCH = 333, tDOT2 = 334, tDOT3 = 335, tAREF = 336, tASET = 337, tLSHFT = 338, tRSHFT = 339, tCOLON2 = 340, tCOLON3 = 341, tOP_ASGN = 342, tASSOC = 343, tLPAREN = 344, tLPAREN_ARG = 345, tRPAREN = 346, tLBRACK = 347, tLBRACE = 348, tLBRACE_ARG = 349, tSTAR = 350, tAMPER = 351, tLAMBDA = 352, tSYMBEG = 353, tSTRING_BEG = 354, tXSTRING_BEG = 355, tREGEXP_BEG = 356, tWORDS_BEG = 357, tQWORDS_BEG = 358, tSTRING_DBEG = 359, tSTRING_DVAR = 360, tSTRING_END = 361, tLAMBEG = 362, tLOWEST = 363, tUMINUS_NUM = 364, idNULL = 365, idRespond_to = 366, idIFUNC = 367, idCFUNC = 368, id_core_set_method_alias = 369, id_core_set_variable_alias = 370, id_core_undef_method = 371, id_core_define_method = 372, id_core_define_singleton_method = 373, id_core_set_postexe = 374, tLAST_TOKEN = 375 } |
enum | string_type { str_squote = (0), str_dquote = (STR_FUNC_EXPAND), str_xquote = (STR_FUNC_EXPAND), str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), str_sword = (STR_FUNC_QWORDS), str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), str_ssym = (STR_FUNC_SYMBOL), str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND), str_squote = (0), str_dquote = (STR_FUNC_EXPAND), str_xquote = (STR_FUNC_EXPAND), str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), str_sword = (STR_FUNC_QWORDS), str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), str_ssym = (STR_FUNC_SYMBOL), str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) } |
Functions | |
static ID | register_symid (ID, const char *, long, rb_encoding *) |
static int | vtable_size (const struct vtable *tbl) |
static struct vtable * | vtable_alloc (struct vtable *prev) |
static void | vtable_free (struct vtable *tbl) |
static void | vtable_add (struct vtable *tbl, ID id) |
static int | vtable_included (const struct vtable *tbl, ID id) |
static int | parser_yyerror (struct parser_params *, const char *) |
static int | yylex (void *, void *) |
static NODE * | node_newnode (struct parser_params *, enum node_type, VALUE, VALUE, VALUE) |
static NODE * | cond_gen (struct parser_params *, NODE *) |
static NODE * | logop_gen (struct parser_params *, enum node_type, NODE *, NODE *) |
static NODE * | newline_node (NODE *) |
static void | fixpos (NODE *, NODE *) |
static int | value_expr_gen (struct parser_params *, NODE *) |
static void | void_expr_gen (struct parser_params *, NODE *) |
static NODE * | remove_begin (NODE *) |
static void | void_stmts_gen (struct parser_params *, NODE *) |
static void | reduce_nodes_gen (struct parser_params *, NODE **) |
static void | block_dup_check_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | block_append_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | list_append_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | list_concat_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | arg_append_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | arg_concat_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | literal_concat_gen (struct parser_params *, NODE *, NODE *) |
static int | literal_concat0 (struct parser_params *, VALUE, VALUE) |
static NODE * | new_evstr_gen (struct parser_params *, NODE *) |
static NODE * | evstr2dstr_gen (struct parser_params *, NODE *) |
static NODE * | splat_array (NODE *) |
static NODE * | call_bin_op_gen (struct parser_params *, NODE *, ID, NODE *) |
static NODE * | call_uni_op_gen (struct parser_params *, NODE *, ID) |
static NODE * | new_args_gen (struct parser_params *, NODE *, NODE *, ID, NODE *, ID) |
static NODE * | negate_lit (NODE *) |
static NODE * | ret_args_gen (struct parser_params *, NODE *) |
static NODE * | arg_blk_pass (NODE *, NODE *) |
static NODE * | new_yield_gen (struct parser_params *, NODE *) |
static NODE * | gettable_gen (struct parser_params *, ID) |
static NODE * | assignable_gen (struct parser_params *, ID, NODE *) |
static NODE * | aryset_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | attrset_gen (struct parser_params *, NODE *, ID) |
static void | rb_backref_error_gen (struct parser_params *, NODE *) |
static NODE * | node_assign_gen (struct parser_params *, NODE *, NODE *) |
static NODE * | match_op_gen (struct parser_params *, NODE *, NODE *) |
static ID * | local_tbl_gen (struct parser_params *) |
static void | fixup_nodes (NODE **) |
int | rb_dvar_defined (ID) |
int | rb_local_defined (ID) |
int | rb_parse_in_eval (void) |
int | rb_parse_in_main (void) |
static VALUE | reg_compile_gen (struct parser_params *, VALUE, int) |
static void | reg_fragment_setenc_gen (struct parser_params *, VALUE, int) |
static int | reg_fragment_check_gen (struct parser_params *, VALUE, int) |
static NODE * | reg_named_capture_assign_gen (struct parser_params *parser, VALUE regexp, NODE *match) |
static ID | formal_argument_gen (struct parser_params *, ID) |
static ID | shadowing_lvar_gen (struct parser_params *, ID) |
static void | new_bv_gen (struct parser_params *, ID) |
static void | local_push_gen (struct parser_params *, int) |
static void | local_pop_gen (struct parser_params *) |
static int | local_var_gen (struct parser_params *, ID) |
static int | arg_var_gen (struct parser_params *, ID) |
static int | local_id_gen (struct parser_params *, ID) |
static ID | internal_id_gen (struct parser_params *) |
static struct vtable * | dyna_push_gen (struct parser_params *) |
static void | dyna_pop_gen (struct parser_params *, const struct vtable *) |
static int | dyna_in_block_gen (struct parser_params *) |
static int | dvar_defined_gen (struct parser_params *, ID) |
static int | dvar_curr_gen (struct parser_params *, ID) |
static int | lvar_defined_gen (struct parser_params *, ID) |
static void | token_info_push (struct parser_params *, const char *token) |
static void | token_info_pop (struct parser_params *, const char *token) |
static void | yydestruct (char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) const |
int | yyparse () |
int | yyparse (struct parser_params *parser) |
static int | parser_regx_options (struct parser_params *) |
static int | parser_tokadd_string (struct parser_params *, int, int, int, long *, rb_encoding **) |
static void | parser_tokaddmbc (struct parser_params *parser, int c, rb_encoding *enc) |
static int | parser_parse_string (struct parser_params *, NODE *) |
static int | parser_here_document (struct parser_params *, NODE *) |
static int | token_info_get_column (struct parser_params *parser, const char *token) |
static int | token_info_has_nonspaces (struct parser_params *parser, const char *token) |
static void | parser_prepare (struct parser_params *parser) |
VALUE | ruby_suppress_tracing (VALUE(*func)(VALUE, int), VALUE arg, int always) |
static VALUE | debug_lines (const char *f) |
static VALUE | coverage (const char *f, int n) |
static int | e_option_supplied (struct parser_params *parser) |
static VALUE | yycompile0 (VALUE arg, int tracing) |
static NODE * | yycompile (struct parser_params *parser, const char *f, int line) |
static rb_encoding * | must_be_ascii_compatible (VALUE s) |
static VALUE | lex_get_str (struct parser_params *parser, VALUE s) |
static VALUE | lex_getline (struct parser_params *parser) |
static NODE * | parser_compile_string (volatile VALUE vparser, const char *f, VALUE s, int line) |
NODE * | rb_compile_string (const char *f, VALUE s, int line) |
NODE * | rb_parser_compile_string (volatile VALUE vparser, const char *f, VALUE s, int line) |
NODE * | rb_compile_cstr (const char *f, const char *s, int len, int line) |
NODE * | rb_parser_compile_cstr (volatile VALUE vparser, const char *f, const char *s, int len, int line) |
static VALUE | lex_io_gets (struct parser_params *parser, VALUE io) |
NODE * | rb_compile_file (const char *f, VALUE file, int start) |
NODE * | rb_parser_compile_file (volatile VALUE vparser, const char *f, VALUE file, int start) |
static VALUE | parser_str_new (const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) |
static int | parser_nextc (struct parser_params *parser) |
static void | parser_pushback (struct parser_params *parser, int c) |
static char * | parser_newtok (struct parser_params *parser) |
static char * | parser_tokspace (struct parser_params *parser, int n) |
static void | parser_tokadd (struct parser_params *parser, int c) |
static int | parser_tok_hex (struct parser_params *parser, size_t *numlen) |
static int | parser_tokadd_utf8 (struct parser_params *parser, rb_encoding **encp, int string_literal, int symbol_literal, int regexp_literal) |
static int | parser_read_escape (struct parser_params *parser, int flags, rb_encoding **encp) |
static int | parser_tokadd_escape (struct parser_params *parser, rb_encoding **encp) |
int | rb_char_to_option_kcode (int c, int *option, int *kcode) |
static void | dispose_string (VALUE str) |
static int | parser_tokadd_mbchar (struct parser_params *parser, int c) |
static int | parser_heredoc_identifier (struct parser_params *parser) |
static void | parser_heredoc_restore (struct parser_params *parser, NODE *here) |
static int | parser_whole_match_p (struct parser_params *parser, const char *eos, long len, int indent) |
static void | arg_ambiguous_gen (struct parser_params *parser) |
static long | parser_encode_length (struct parser_params *parser, const char *name, long len) |
static void | parser_set_encode (struct parser_params *parser, const char *name) |
static int | comment_at_top (struct parser_params *parser) |
static void | magic_comment_encoding (struct parser_params *parser, const char *name, const char *val) |
static const char * | magic_comment_marker (const char *str, long len) |
static int | parser_magic_comment (struct parser_params *parser, const char *str, long len) |
static void | set_file_encoding (struct parser_params *parser, const char *str, const char *send) |
static int | parser_yylex (struct parser_params *parser) |
yylex (void *p) | |
enum node_type | nodetype (NODE *node) |
int | nodeline (NODE *node) |
static void | parser_warning (struct parser_params *parser, NODE *node, const char *mesg) |
static void | parser_warn (struct parser_params *parser, NODE *node, const char *mesg) |
ID | rb_id_attrset (ID id) |
static int | assign_in_cond (struct parser_params *parser, NODE *node) |
static void | warn_unless_e_option (struct parser_params *parser, NODE *node, const char *str) |
static void | warning_unless_e_option (struct parser_params *parser, NODE *node, const char *str) |
static NODE * | cond0 (struct parser_params *, NODE *) |
static NODE * | range_op (struct parser_params *parser, NODE *node) |
static int | literal_node (NODE *node) |
static void | no_blockarg (struct parser_params *parser, NODE *node) |
static ID * | vtable_tblcpy (ID *buf, const struct vtable *src) |
static void | dyna_pop_1 (struct parser_params *parser) |
VALUE | rb_reg_compile (VALUE str, int options, const char *sourcefile, int sourceline) |
VALUE | rb_reg_check_preprocess (VALUE) |
static int | reg_named_capture_assign_iter (const OnigUChar *name, const OnigUChar *name_end, int back_num, int *back_refs, OnigRegex regex, void *arg0) |
void | rb_gc_mark_parser (void) |
NODE * | rb_parser_append_print (VALUE vparser, NODE *node) |
NODE * | rb_parser_while_loop (VALUE vparser, NODE *node, int chop, int split) |
void | Init_sym (void) |
void | rb_gc_mark_symbols (void) |
static int | is_special_global_name (const char *m, const char *e, rb_encoding *enc) |
int | rb_symname_p (const char *name) |
int | rb_enc_symname_p (const char *name, rb_encoding *enc) |
int | rb_enc_symname2_p (const char *name, long len, rb_encoding *enc) |
ID | rb_intern3 (const char *name, long len, rb_encoding *enc) |
ID | rb_intern2 (const char *name, long len) |
ID | rb_intern (const char *name) |
ID | rb_intern_str (VALUE str) |
VALUE | rb_id2str (ID id) |
const char * | rb_id2name (ID id) |
static int | symbols_i (VALUE sym, ID value, VALUE ary) |
VALUE | rb_sym_all_symbols (void) |
int | rb_is_const_id (ID id) |
int | rb_is_class_id (ID id) |
int | rb_is_instance_id (ID id) |
int | rb_is_local_id (ID id) |
int | rb_is_junk_id (ID id) |
static void | parser_initialize (struct parser_params *parser) |
static void | parser_mark (void *ptr) |
static void | parser_free (void *ptr) |
static size_t | parser_memsize (const void *ptr) |
VALUE | rb_parser_get_yydebug (VALUE) |
VALUE | rb_parser_set_yydebug (VALUE, VALUE) |
struct kwtable * | rb_reserved_word (const char *str, unsigned int len) |
static struct parser_params * | parser_new (void) |
VALUE | rb_parser_new (void) |
VALUE | rb_parser_end_seen_p (VALUE vparser) |
VALUE | rb_parser_encoding (VALUE vparser) |
Variables | |
static const yytype_uint8 | yytranslate [] |
static const yytype_uint16 | yyr1 [] |
static const yytype_uint8 | yyr2 [] |
static const yytype_uint16 | yydefact [] |
static const yytype_int16 | yydefgoto [] |
static const yytype_int16 | yypact [] |
static const yytype_int16 | yypgoto [] |
static const yytype_int16 | yytable [] |
static const yytype_int16 | yycheck [] |
static const yytype_uint16 | yystos [] |
static const rb_data_type_t | parser_data_type |
static struct magic_comment | magic_comments [] |
struct { | |
ID token | |
const char * name | |
} | op_tbl [] |
static struct symbols | global_symbols |
static struct st_hash_type | symhash |
#define ambiguous_operator | ( | op, | ||
syn | ||||
) |
( \ rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ rb_warning0("even though it seems like "syn""))
#define arg_ambiguous | ( | ) | (arg_ambiguous_gen(parser), 1) |
Definition at line 12220 of file parse.c.
Referenced by arg_ambiguous_gen(), and parser_yylex().
#define arg_append | ( | h, | ||
t | ||||
) | arg_append_gen(parser,h,t) |
Definition at line 420 of file parse.c.
Referenced by arg_append_gen(), node_assign_gen(), and yyparse().
#define arg_concat | ( | h, | ||
t | ||||
) | arg_concat_gen(parser,h,t) |
Definition at line 422 of file parse.c.
Referenced by arg_concat_gen(), and yyparse().
#define aryset | ( | node1, | ||
node2 | ||||
) | aryset_gen(parser, node1, node2) |
Definition at line 450 of file parse.c.
Referenced by reg_named_capture_assign_iter(), and yyparse().
#define assignable_result | ( | x | ) | x |
#define BITSTACK_LEXPOP | ( | stack | ) | (stack = (stack >> 1) | (stack & 1)) |
#define BITSTACK_PUSH | ( | stack, | ||
n | ||||
) | (stack = (stack<<1)|((n)&1)) |
#define block_append | ( | h, | ||
t | ||||
) | block_append_gen(parser,h,t) |
Definition at line 414 of file parse.c.
Referenced by rb_parser_append_print(), rb_parser_while_loop(), reg_named_capture_assign_gen(), reg_named_capture_assign_iter(), and yyparse().
#define block_dup_check | ( | n1, | ||
n2 | ||||
) | block_dup_check_gen(parser,n1,n2) |
#define CMDARG_LEXPOP | ( | ) | BITSTACK_LEXPOP(cmdarg_stack) |
Definition at line 148 of file parse.c.
Referenced by parser_yylex().
#define CMDARG_P | ( | ) | BITSTACK_SET_P(cmdarg_stack) |
Definition at line 149 of file parse.c.
Referenced by parser_yylex().
#define CMDARG_PUSH | ( | n | ) | BITSTACK_PUSH(cmdarg_stack, n) |
Definition at line 146 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define cmdarg_stack (parser->parser_cmdarg_stack) |
#define command_start (parser->parser_command_start) |
Definition at line 367 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define compile_error parser->nerr++,rb_compile_error |
Definition at line 652 of file parse.c.
Referenced by assignable_gen(), block_dup_check_gen(), gettable_gen(), literal_concat0(), new_bv_gen(), no_blockarg(), parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), parser_tokadd_mbchar(), parser_yyerror(), parser_yylex(), rb_backref_error_gen(), reg_compile_gen(), reg_fragment_check_gen(), reg_fragment_setenc_gen(), and yyparse().
#define compile_for_eval (parser->parser_compile_for_eval) |
Definition at line 354 of file parse.c.
Referenced by parser_compile_string(), rb_parser_compile_file(), token_info_push(), yycompile0(), and yyparse().
#define cond | ( | node | ) | cond_gen(parser, node) |
Definition at line 393 of file parse.c.
Referenced by value_expr_gen(), and yyparse().
#define COND_LEXPOP | ( | ) | BITSTACK_LEXPOP(cond_stack) |
Definition at line 143 of file parse.c.
Referenced by parser_yylex().
#define COND_P | ( | ) | BITSTACK_SET_P(cond_stack) |
Definition at line 144 of file parse.c.
Referenced by parser_yylex().
#define COND_POP | ( | ) | BITSTACK_POP(cond_stack) |
#define COND_PUSH | ( | n | ) | BITSTACK_PUSH(cond_stack, n) |
Definition at line 141 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define cond_stack (parser->parser_cond_stack) |
#define cur_mid (parser->parser_cur_mid) |
#define deferred_nodes (parser->parser_deferred_nodes) |
Definition at line 528 of file parse.c.
Referenced by assignable_gen(), and shadowing_lvar_gen().
Definition at line 526 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), lvar_defined_gen(), reg_named_capture_assign_iter(), and shadowing_lvar_gen().
#define DVARS_INHERIT ((void*)1) |
Definition at line 164 of file parse.c.
Referenced by dvar_defined_gen(), local_id_gen(), and local_push_gen().
#define DVARS_TOPSCOPE NULL |
Definition at line 165 of file parse.c.
Referenced by local_push_gen().
#define dyna_in_block | ( | ) | dyna_in_block_gen(parser) |
Definition at line 523 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), lvar_defined_gen(), shadowing_lvar_gen(), and yyparse().
#define dyna_pop | ( | node | ) | dyna_pop_gen(parser, node) |
#define dyna_push | ( | ) | dyna_push_gen(parser) |
Definition at line 524 of file parse.c.
Referenced by assignable_gen(), and new_bv_gen().
#define ENC_SINGLE | ( | cr | ) | ((cr)==ENC_CODERANGE_7BIT) |
Definition at line 330 of file parse.c.
Referenced by parser_yylex().
#define ESCAPE_CONTROL 1 |
Definition at line 11576 of file parse.c.
Referenced by parser_read_escape(), and parser_tokadd_escape().
#define ESCAPE_META 2 |
Definition at line 11577 of file parse.c.
Referenced by parser_read_escape(), and parser_tokadd_escape().
#define evstr2dstr | ( | n | ) | evstr2dstr_gen(parser,n) |
Definition at line 484 of file parse.c.
Referenced by assignable_gen(), and yyparse().
Definition at line 448 of file parse.c.
Referenced by reg_named_capture_assign_gen(), reg_named_capture_assign_iter(), and yyparse().
#define here_document | ( | n | ) | parser_here_document(parser,n) |
Definition at line 10871 of file parse.c.
Referenced by parser_yylex().
#define heredoc_end (parser->parser_heredoc_end) |
Definition at line 366 of file parse.c.
Referenced by parser_heredoc_restore(), and parser_nextc().
#define heredoc_identifier | ( | ) | parser_heredoc_identifier(parser) |
Definition at line 10872 of file parse.c.
Referenced by parser_yylex().
#define heredoc_restore | ( | n | ) | parser_heredoc_restore(parser,n) |
Definition at line 10873 of file parse.c.
Referenced by parser_here_document().
#define in_def (parser->parser_in_def) |
Definition at line 353 of file parse.c.
Referenced by assignable_gen(), and yyparse().
#define in_defined (parser->parser_in_defined) |
#define in_single (parser->parser_in_single) |
Definition at line 352 of file parse.c.
Referenced by assignable_gen(), and yyparse().
#define internal_id | ( | ) | internal_id_gen(parser) |
#define IS_ARG | ( | ) | (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) |
Definition at line 12515 of file parse.c.
Referenced by parser_yylex().
#define is_asgn_or_id | ( | id | ) |
((is_notop_id(id)) && \ (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ ((id)&ID_SCOPE_MASK) == ID_CLASS))
Definition at line 114 of file parse.c.
Referenced by yyparse().
Definition at line 109 of file parse.c.
Referenced by rb_id2str(), and rb_intern3().
#define IS_BEG | ( | ) | (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) |
Definition at line 12517 of file parse.c.
Referenced by parser_yylex().
Definition at line 111 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), and rb_is_class_id().
Definition at line 110 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), and rb_is_const_id().
#define IS_END | ( | ) | (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN) |
Definition at line 12516 of file parse.c.
Referenced by parser_yylex().
Definition at line 107 of file parse.c.
Referenced by assignable_gen(), and gettable_gen().
#define is_identchar | ( | p, | ||
e, | ||||
enc | ||||
) | (rb_enc_isalnum(*p,enc) || (*p) == '_' || !ISASCII(*p)) |
Definition at line 10970 of file parse.c.
Referenced by is_special_global_name(), parser_yylex(), rb_enc_symname2_p(), and rb_intern3().
Definition at line 108 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), and rb_is_instance_id().
Definition at line 112 of file parse.c.
Referenced by rb_is_junk_id().
Definition at line 106 of file parse.c.
Referenced by assignable_gen(), formal_argument_gen(), gettable_gen(), new_bv_gen(), parser_yylex(), rb_id2str(), rb_is_local_id(), and yyparse().
#define IS_SPCARG | ( | c | ) | (IS_ARG() && space_seen && !ISSPACE(c)) |
Definition at line 12518 of file parse.c.
Referenced by parser_yylex().
#define lex_gets (parser->parser_lex_gets) |
Definition at line 370 of file parse.c.
Referenced by parser_compile_string(), and rb_parser_compile_file().
#define lex_gets_ptr (parser->parser_lex_gets_ptr) |
Definition at line 369 of file parse.c.
Referenced by lex_get_str(), and parser_compile_string().
#define lex_goto_eol | ( | parser | ) | (parser->parser_lex_p = parser->parser_lex_pend) |
Definition at line 11376 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_nextc(), and parser_yylex().
#define lex_input (parser->parser_lex_input) |
Definition at line 360 of file parse.c.
Referenced by parser_compile_string(), parser_nextc(), and rb_parser_compile_file().
#define lex_lastline (parser->parser_lex_lastline) |
Definition at line 361 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_heredoc_restore(), parser_nextc(), parser_prepare(), parser_yyerror(), and yycompile0().
#define lex_nextline (parser->parser_lex_nextline) |
Definition at line 362 of file parse.c.
Referenced by parser_nextc(), parser_yylex(), and yycompile0().
#define lex_p (parser->parser_lex_p) |
Definition at line 364 of file parse.c.
Referenced by comment_at_top(), parser_compile_string(), parser_here_document(), parser_heredoc_identifier(), parser_heredoc_restore(), parser_nextc(), parser_prepare(), parser_pushback(), parser_read_escape(), parser_tok_hex(), parser_tokadd_escape(), parser_tokadd_mbchar(), parser_tokadd_string(), parser_tokadd_utf8(), parser_yyerror(), parser_yylex(), rb_parser_compile_file(), token_info_get_column(), token_info_has_nonspaces(), and yycompile0().
#define lex_pbeg (parser->parser_lex_pbeg) |
Definition at line 363 of file parse.c.
Referenced by parser_compile_string(), parser_heredoc_restore(), parser_nextc(), parser_prepare(), parser_pushback(), parser_yyerror(), rb_parser_compile_file(), token_info_get_column(), token_info_has_nonspaces(), and yycompile0().
#define lex_pend (parser->parser_lex_pend) |
Definition at line 365 of file parse.c.
Referenced by parser_compile_string(), parser_here_document(), parser_heredoc_restore(), parser_nextc(), parser_prepare(), parser_tokadd_string(), parser_whole_match_p(), parser_yyerror(), parser_yylex(), rb_parser_compile_file(), and yycompile0().
#define lex_state (parser->parser_lex_state) |
Definition at line 346 of file parse.c.
Referenced by parser_yylex(), and yyparse().
#define lex_strterm (parser->parser_lex_strterm) |
Definition at line 345 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_yylex(), yycompile0(), and yyparse().
#define list_append | ( | l, | ||
i | ||||
) | list_append_gen(parser,l,i) |
Definition at line 416 of file parse.c.
Referenced by arg_append_gen(), evstr2dstr_gen(), literal_concat_gen(), and yyparse().
#define list_concat | ( | h, | ||
t | ||||
) | list_concat_gen(parser,h,t) |
Definition at line 418 of file parse.c.
Referenced by arg_concat_gen(), literal_concat_gen(), and yyparse().
#define literal_concat | ( | h, | ||
t | ||||
) | literal_concat_gen(parser,h,t) |
Definition at line 514 of file parse.c.
Referenced by assignable_gen(), gettable_gen(), lvar_defined_gen(), reg_named_capture_assign_iter(), shadowing_lvar_gen(), and yyparse().
#define local_pop | ( | ) | local_pop_gen(parser) |
Definition at line 510 of file parse.c.
Referenced by assignable_gen().
#define lpar_beg (parser->parser_lpar_beg) |
Definition at line 351 of file parse.c.
Referenced by parser_yylex(), and yyparse().
Definition at line 531 of file parse.c.
Referenced by parser_yylex().
#define lvtbl (parser->parser_lvtbl) |
Definition at line 371 of file parse.c.
Referenced by arg_var_gen(), dvar_curr_gen(), dvar_defined_gen(), dyna_in_block_gen(), dyna_pop_1(), dyna_pop_gen(), dyna_push_gen(), internal_id_gen(), local_id_gen(), local_pop_gen(), local_push_gen(), local_tbl_gen(), local_var_gen(), and shadowing_lvar_gen().
#define match_op | ( | node1, | ||
node2 | ||||
) | match_op_gen(parser, node1, node2) |
#define mixed_error | ( | enc1, | ||
enc2 | ||||
) |
if (!errbuf) { \ size_t len = sizeof(mixed_msg) - 4; \ len += strlen(rb_enc_name(enc1)); \ len += strlen(rb_enc_name(enc2)); \ errbuf = ALLOCA_N(char, len); \ snprintf(errbuf, len, mixed_msg, \ rb_enc_name(enc1), \ rb_enc_name(enc2)); \ yyerror(errbuf); \ }
#define mixed_escape | ( | beg, | ||
enc1, | ||||
enc2 | ||||
) |
do { \ const char *pos = lex_p; \ lex_p = beg; \ mixed_error(enc1, enc2); \ lex_p = pos; \ } while (0)
#define nd_paren | ( | node | ) | (char)((node)->u2.id >> CHAR_BIT*2) |
Definition at line 550 of file parse.c.
Referenced by parser_parse_string().
#define nd_term | ( | node | ) | SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) |
Definition at line 548 of file parse.c.
Referenced by parser_parse_string().
#define new_args | ( | f, | ||
o, | ||||
r, | ||||
p, | ||||
b | ||||
) | new_args_gen(parser, f,o,r,p,b) |
#define new_evstr | ( | n | ) | new_evstr_gen(parser,n) |
#define NEW_STRTERM | ( | func, | ||
term, | ||||
paren | ||||
) | rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) |
Definition at line 11941 of file parse.c.
Referenced by parser_here_document(), and parser_yylex().
#define new_yield | ( | node | ) | new_yield_gen(parser, node) |
#define newtok | ( | ) | parser_newtok(parser) |
Definition at line 10861 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), and parser_yylex().
#define nextc | ( | ) | parser_nextc(parser) |
Definition at line 10859 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_prepare(), parser_read_escape(), parser_regx_options(), parser_tokadd_escape(), parser_tokadd_string(), parser_tokadd_utf8(), and parser_yylex().
#define no_digits | ( | ) | do {yyerror("numeric literal without digits"); return 0;} while (0) |
#define node_assign | ( | node1, | ||
node2 | ||||
) | node_assign_gen(parser, node1, node2) |
Definition at line 460 of file parse.c.
Referenced by reg_named_capture_assign_iter(), and yyparse().
#define NODE_HEREDOC NODE_ARRAY |
Definition at line 542 of file parse.c.
Referenced by parser_heredoc_identifier(), and parser_yylex().
#define numberof | ( | array | ) | (int)(sizeof(array) / sizeof((array)[0])) |
Definition at line 88 of file parse.c.
Referenced by parser_magic_comment().
#define paren_nest (parser->parser_paren_nest) |
Definition at line 350 of file parse.c.
Referenced by parser_yylex().
#define parse_string | ( | n | ) | parser_parse_string(parser,n) |
Definition at line 10869 of file parse.c.
Referenced by parser_yylex().
#define PARSER_ARG ruby_sourcefile, ruby_sourceline, |
Definition at line 653 of file parse.c.
Referenced by assignable_gen(), block_dup_check_gen(), gettable_gen(), literal_concat0(), new_bv_gen(), no_blockarg(), parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), parser_tokadd_mbchar(), parser_yyerror(), parser_yylex(), rb_backref_error_gen(), reg_compile_gen(), reg_fragment_check_gen(), reg_fragment_setenc_gen(), and yyparse().
#define parser_encoding_name | ( | ) | (parser->enc->name) |
Definition at line 10967 of file parse.c.
Referenced by parser_tokadd_mbchar().
#define parser_is_identchar | ( | ) | (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) |
Definition at line 10971 of file parse.c.
Referenced by parser_heredoc_identifier(), and parser_yylex().
#define parser_isascii | ( | ) | ISASCII(*(lex_p-1)) |
Definition at line 10973 of file parse.c.
Referenced by parser_tokadd_string(), and parser_yylex().
#define parser_mbclen | ( | ) | mbclen((lex_p-1),lex_pend,parser->enc) |
#define parser_precise_mbclen | ( | ) | rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) |
Definition at line 10969 of file parse.c.
Referenced by parser_tokadd_mbchar().
#define parser_warn | ( | node, | ||
mesg | ||||
) | parser_warn(parser, node, mesg) |
#define parser_warning | ( | node, | ||
mesg | ||||
) | parser_warning(parser, node, mesg) |
#define peek | ( | c | ) | (lex_p < lex_pend && (c) == *lex_p) |
Definition at line 11377 of file parse.c.
Referenced by parser_nextc(), parser_prepare(), parser_read_escape(), parser_tokadd_utf8(), and parser_yylex().
Definition at line 167 of file parse.c.
Referenced by dvar_defined_gen(), dyna_in_block_gen(), local_id_gen(), vtable_add(), vtable_free(), vtable_included(), and vtable_size().
#define pushback | ( | c | ) | parser_pushback(parser, c) |
Definition at line 10860 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_prepare(), parser_read_escape(), parser_regx_options(), parser_tokadd_escape(), parser_tokadd_string(), and parser_yylex().
#define rb_backref_error | ( | n | ) | rb_backref_error_gen(parser,n) |
#define rb_warn0 | ( | fmt | ) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt) |
#define rb_warnI | ( | fmt, | ||
a | ||||
) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) |
Definition at line 627 of file parse.c.
Referenced by parser_yylex().
#define rb_warning0 | ( | fmt | ) | rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt) |
Definition at line 629 of file parse.c.
Referenced by arg_ambiguous_gen(), parser_yylex(), value_expr_gen(), and yyparse().
#define rb_warningS | ( | fmt, | ||
a | ||||
) | rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt, a) |
Definition at line 630 of file parse.c.
Referenced by parser_yylex(), reg_named_capture_assign_iter(), and shadowing_lvar_gen().
#define rb_warnS | ( | fmt, | ||
a | ||||
) | rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) |
Definition at line 628 of file parse.c.
Referenced by void_expr_gen().
#define RE_OPTION_ENCODING | ( | e | ) | (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) |
Definition at line 535 of file parse.c.
Referenced by parser_regx_options().
#define RE_OPTION_ENCODING_IDX | ( | o | ) | (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) |
Definition at line 536 of file parse.c.
Referenced by reg_fragment_setenc_gen().
#define RE_OPTION_ENCODING_NONE | ( | o | ) | ((o)&RE_OPTION_ARG_ENCODING_NONE) |
Definition at line 537 of file parse.c.
Referenced by reg_fragment_setenc_gen().
#define RE_OPTION_MASK 0xff |
Definition at line 538 of file parse.c.
Referenced by reg_compile_gen().
#define read_escape | ( | flags, | ||
e | ||||
) | parser_read_escape(parser, flags, e) |
Definition at line 10865 of file parse.c.
Referenced by parser_read_escape(), parser_tokadd_string(), and parser_yylex().
#define reduce_nodes | ( | n | ) | reduce_nodes_gen(parser,n) |
#define reg_compile | ( | str, | ||
options | ||||
) | reg_compile_gen(parser, str, options) |
#define reg_fragment_check | ( | str, | ||
options | ||||
) | reg_fragment_check_gen(parser, str, options) |
#define reg_fragment_setenc | ( | str, | ||
options | ||||
) | reg_fragment_setenc_gen(parser, str, options) |
Definition at line 478 of file parse.c.
Referenced by reg_compile_gen(), and reg_fragment_check_gen().
#define reg_named_capture_assign | ( | regexp, | ||
match | ||||
) | reg_named_capture_assign_gen(parser,regexp,match) |
#define regx_options | ( | ) | parser_regx_options(parser) |
Definition at line 10867 of file parse.c.
Referenced by parser_parse_string().
#define ret_args | ( | node | ) | ret_args_gen(parser, node) |
#define ripper_flush | ( | p | ) | (void)(p) |
Definition at line 10900 of file parse.c.
Referenced by parser_heredoc_identifier(), parser_heredoc_restore(), and parser_nextc().
#define ruby__end__seen (parser->parser_ruby__end__seen) |
Definition at line 372 of file parse.c.
Referenced by parser_yylex(), and rb_parser_end_seen_p().
#define ruby_coverage (parser->coverage) |
Definition at line 381 of file parse.c.
Referenced by lex_getline(), and yycompile0().
#define ruby_debug_lines (parser->debug_lines) |
Definition at line 380 of file parse.c.
Referenced by lex_getline(), and yycompile0().
#define ruby_eval_tree (parser->parser_eval_tree) |
#define ruby_eval_tree_begin (parser->parser_eval_tree_begin) |
Definition at line 379 of file parse.c.
Referenced by yycompile0(), and yyparse().
#define ruby_sourcefile (parser->parser_ruby_sourcefile) |
#define ruby_sourceline (parser->parser_ruby_sourceline) |
#define set_yylval_id | ( | x | ) | yylval.id = x |
Definition at line 10879 of file parse.c.
Referenced by parser_yylex().
#define set_yylval_literal | ( | x | ) | yylval.node = NEW_LIT(x) |
Definition at line 10881 of file parse.c.
Referenced by parser_yylex().
#define set_yylval_name | ( | x | ) | yylval.id = x |
Definition at line 10880 of file parse.c.
Referenced by parser_yylex().
#define set_yylval_node | ( | x | ) | yylval.node = x |
Definition at line 10882 of file parse.c.
Referenced by parser_yylex().
#define set_yylval_num | ( | x | ) | yylval.num = x |
Definition at line 10878 of file parse.c.
Referenced by parser_parse_string().
#define set_yylval_str | ( | x | ) | yylval.node = NEW_STR(x) |
Definition at line 10877 of file parse.c.
Referenced by parser_here_document(), parser_parse_string(), and parser_yylex().
Definition at line 501 of file parse.c.
Referenced by formal_argument_gen(), new_bv_gen(), and yyparse().
#define SIGN_EXTEND | ( | x, | ||
n | ||||
) | (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) |
#define SIGN_EXTEND_CHAR | ( | c | ) | ((((unsigned char)(c)) ^ 128) - 128) |
#define str_copy | ( | _s, | ||
_p, | ||||
_n | ||||
) |
((_s) \ ? (rb_str_resize((_s), (_n)), \ MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ : ((_s) = STR_NEW((_p), (_n))))
#define STR_FUNC_ESCAPE 0x01 |
Definition at line 11341 of file parse.c.
Referenced by parser_tokadd_string().
#define STR_FUNC_EXPAND 0x02 |
Definition at line 11342 of file parse.c.
Referenced by parser_here_document(), parser_parse_string(), and parser_tokadd_string().
#define STR_FUNC_INDENT 0x20 |
Definition at line 11346 of file parse.c.
Referenced by parser_here_document(), and parser_heredoc_identifier().
#define STR_FUNC_QWORDS 0x08 |
Definition at line 11344 of file parse.c.
Referenced by parser_parse_string(), and parser_tokadd_string().
#define STR_FUNC_REGEXP 0x04 |
Definition at line 11343 of file parse.c.
Referenced by parser_parse_string(), parser_str_new(), and parser_tokadd_string().
#define STR_FUNC_SYMBOL 0x10 |
Definition at line 11345 of file parse.c.
Referenced by parser_tokadd_string().
#define STR_NEW | ( | p, | ||
n | ||||
) | rb_enc_str_new((p),(n),parser->enc) |
Definition at line 326 of file parse.c.
Referenced by parser_here_document(), and parser_heredoc_identifier().
#define STR_NEW0 | ( | ) | rb_enc_str_new(0,0,parser->enc) |
Definition at line 327 of file parse.c.
Referenced by yycompile0(), and yyparse().
#define STR_NEW2 | ( | p | ) | rb_enc_str_new((p),strlen(p),parser->enc) |
Definition at line 328 of file parse.c.
Referenced by parser_yyerror().
Definition at line 329 of file parse.c.
Referenced by parser_here_document(), parser_parse_string(), and parser_yylex().
#define subnodes | ( | n1, | ||
n2 | ||||
) |
((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ (!node->n2) ? (body = &node->n1, 1) : \ (reduce_nodes(&node->n1), body = &node->n2, 1))
#define tok | ( | ) | tokenbuf |
Definition at line 11447 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), and parser_yylex().
#define tok_hex | ( | numlen | ) | parser_tok_hex(parser, numlen) |
Definition at line 10864 of file parse.c.
Referenced by parser_read_escape(), and parser_tokadd_escape().
#define TOK_INTERN | ( | mb | ) | rb_intern3(tok(), toklen(), parser->enc) |
Definition at line 331 of file parse.c.
Referenced by parser_yylex().
#define tokadd | ( | c | ) | parser_tokadd(parser, c) |
Definition at line 10863 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), parser_tokadd_escape(), parser_tokadd_mbchar(), parser_tokadd_string(), parser_tokadd_utf8(), and parser_yylex().
#define tokadd_escape | ( | e | ) | parser_tokadd_escape(parser, e) |
Definition at line 10866 of file parse.c.
Referenced by parser_tokadd_string().
#define tokadd_mbchar | ( | c | ) | parser_tokadd_mbchar(parser, c) |
Definition at line 11815 of file parse.c.
Referenced by parser_heredoc_identifier(), parser_tokadd_string(), and parser_yylex().
#define tokadd_string | ( | f, | ||
t, | ||||
p, | ||||
n, | ||||
e | ||||
) | parser_tokadd_string(parser,f,t,p,n,e) |
Definition at line 10868 of file parse.c.
Referenced by parser_here_document(), and parser_parse_string().
#define tokaddmbc | ( | c, | ||
enc | ||||
) | parser_tokaddmbc(parser, c, enc) |
Definition at line 10870 of file parse.c.
Referenced by parser_tokadd_utf8(), and parser_yylex().
#define tokcopy | ( | n | ) | memcpy(tokspace(n), lex_p - (n), (n)) |
Definition at line 11502 of file parse.c.
Referenced by parser_tokadd_escape(), parser_tokadd_mbchar(), and parser_tokadd_utf8().
#define tokenbuf (parser->parser_tokenbuf) |
Definition at line 357 of file parse.c.
Referenced by parser_newtok(), parser_tokadd(), and parser_tokspace().
#define tokfix | ( | ) | (tokenbuf[tokidx]='\0') |
Definition at line 11446 of file parse.c.
Referenced by parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), and parser_yylex().
#define tokidx (parser->parser_tokidx) |
Definition at line 358 of file parse.c.
Referenced by parser_newtok(), parser_tokadd(), parser_tokspace(), and parser_yylex().
#define toklast | ( | ) | (tokidx>0?tokenbuf[tokidx-1]:0) |
Definition at line 11449 of file parse.c.
Referenced by parser_yylex().
#define toklen | ( | ) | tokidx |
Definition at line 11448 of file parse.c.
Referenced by parser_here_document(), parser_heredoc_identifier(), parser_parse_string(), parser_regx_options(), and parser_yylex().
#define toksiz (parser->parser_toksiz) |
Definition at line 359 of file parse.c.
Referenced by parser_newtok(), parser_tokadd(), and parser_tokspace().
#define tokspace | ( | n | ) | parser_tokspace(parser, n) |
Definition at line 10862 of file parse.c.
Referenced by parser_tokaddmbc().
#define UTF8_ENC | ( | ) |
(parser->utf8 ? parser->utf8 : \ (parser->utf8 = rb_utf8_encoding()))
Definition at line 324 of file parse.c.
Referenced by parser_tokadd_utf8().
#define value_expr | ( | node | ) | value_expr_gen(parser, (node) = remove_begin(node)) |
Definition at line 403 of file parse.c.
Referenced by call_bin_op_gen(), call_uni_op_gen(), logop_gen(), match_op_gen(), range_op(), value_expr_gen(), and yyparse().
#define void_expr | ( | node | ) | void_expr0((node) = remove_begin(node)) |
#define void_expr0 | ( | node | ) | void_expr_gen(parser, (node)) |
Definition at line 404 of file parse.c.
Referenced by void_stmts_gen().
#define void_stmts | ( | node | ) | void_stmts_gen(parser, node) |
#define VTBL_DEBUG 0 |
Definition at line 180 of file parse.c.
Referenced by vtable_add(), vtable_alloc(), and vtable_free().
#define warn_balanced | ( | op, | ||
syn | ||||
) |
(last_state != EXPR_CLASS && last_state != EXPR_DOT && \ last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \ last_state != EXPR_ENDARG && \ space_seen && !ISSPACE(c) && \ (ambiguous_operator(op, syn), 0))
Definition at line 12527 of file parse.c.
Referenced by parser_yylex().
#define was_bol | ( | ) | (lex_p == lex_pbeg + 1) |
Definition at line 11444 of file parse.c.
Referenced by parser_here_document(), and parser_yylex().
#define whole_match_p | ( | e, | ||
l, | ||||
i | ||||
) | parser_whole_match_p(parser,e,l,i) |
Definition at line 10874 of file parse.c.
Referenced by parser_here_document(), and parser_yylex().
#define YY_STACK_PRINT | ( | Bottom, | ||
Top | ||||
) |
#define YY_SYMBOL_PRINT | ( | Title, | ||
Type, | ||||
Value, | ||||
Location | ||||
) |
Definition at line 4370 of file parse.c.
Referenced by yydestruct(), and yyparse().
#define YYBACKUP | ( | Token, | ||
Value | ||||
) |
do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ parser_yyerror (parser, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0))
#define YYCOPY | ( | To, | ||
From, | ||||
Count | ||||
) |
Definition at line 341 of file parse.c.
Referenced by assign_in_cond(), assignable_gen(), formal_argument_gen(), parser_read_escape(), parser_tok_hex(), parser_tokadd_escape(), parser_tokadd_utf8(), parser_yylex(), shadowing_lvar_gen(), value_expr_gen(), and yyparse().
#define YYLLOC_DEFAULT | ( | Current, | ||
Rhs, | ||||
N | ||||
) |
do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0))
#define YYPOPSTACK | ( | N | ) | (yyvsp -= (N), yyssp -= (N)) |
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define YYSTACK_BYTES | ( | N | ) |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM)
Definition at line 1027 of file parse.c.
Referenced by yyparse().
#define YYSTACK_RELOCATE | ( | Stack_alloc, | ||
Stack | ||||
) |
do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0))
Definition at line 1054 of file parse.c.
Referenced by yyparse().
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define YYUSE | ( | e | ) | ((void) (e)) |
Definition at line 918 of file parse.c.
Referenced by yydestruct().
typedef long(* rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len) |
typedef void(* rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val) |
typedef VALUE stack_type |
typedef struct token_info token_info |
typedef short int yytype_int16 |
typedef short int yytype_int8 |
typedef unsigned short int yytype_uint16 |
typedef unsigned char yytype_uint8 |
enum lex_state_e |
enum string_type |
enum yytokentype |
static void arg_ambiguous_gen | ( | struct parser_params * | parser | ) | [static] |
Definition at line 12212 of file parse.c.
References arg_ambiguous, dispatch0(), and rb_warning0.
static NODE * arg_append_gen | ( | struct parser_params * | parser, | |
NODE * | node1, | |||
NODE * | node2 | |||
) | [static] |
Definition at line 14388 of file parse.c.
References arg_append, list_append, nd_set_type, nd_type, NEW_ARGSPUSH, NEW_LIST, NODE_ARGSCAT, NODE_ARGSPUSH, NODE_ARRAY, and NODE_BLOCK_PASS.
static NODE * arg_concat_gen | ( | struct parser_params * | parser, | |
NODE * | node1, | |||
NODE * | node2 | |||
) | [static] |
Definition at line 14363 of file parse.c.
References arg_concat, list_concat, nd_set_type, nd_type, NEW_ARGSCAT, NEW_LIST, NODE_ARGSCAT, NODE_ARGSPUSH, NODE_ARRAY, and NODE_BLOCK_PASS.
static int arg_var_gen | ( | struct parser_params * | parser, | |
ID | id | |||
) | [static] |
Definition at line 15026 of file parse.c.
References lvtbl, vtable_add(), and vtable_size().
static NODE * aryset_gen | ( | struct parser_params * | parser, | |
NODE * | recv, | |||
NODE * | idx | |||
) | [static] |
static int assign_in_cond | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14677 of file parse.c.
References nd_type, NODE_DASGN, NODE_DASGN_CURR, NODE_DREGX, NODE_DSTR, NODE_DXSTR, NODE_EVSTR, NODE_FALSE, NODE_GASGN, NODE_IASGN, NODE_LASGN, NODE_LIT, NODE_MASGN, NODE_NIL, NODE_STR, NODE_TRUE, NODE_XSTR, parser_warn, and yyerror.
Referenced by cond0().
static NODE * assignable_gen | ( | struct parser_params * | parser, | |
ID | id, | |||
NODE * | val | |||
) | [static] |
Definition at line 14202 of file parse.c.
References assignable_result, compile_error, dvar_curr, dvar_defined, dyna_in_block, dyna_var, get_id, in_def, in_single, is_class_id, is_const_id, is_global_id, is_instance_id, is_local_id, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, local_id, local_var, NEW_CDECL, NEW_CVASGN, NEW_DASGN, NEW_DASGN_CURR, NEW_GASGN, NEW_IASGN, NEW_LASGN, PARSER_ARG, rb_id2name(), and yyerror.
static NODE * attrset_gen | ( | struct parser_params * | parser, | |
NODE * | recv, | |||
ID | id | |||
) | [static] |
Definition at line 14342 of file parse.c.
References nd_type, NEW_ATTRASGN, NODE_SELF, and rb_id_attrset().
static NODE * block_append_gen | ( | struct parser_params * | parser, | |
NODE * | head, | |||
NODE * | tail | |||
) | [static] |
Definition at line 13902 of file parse.c.
References fixpos(), nd_type, NEW_BLOCK, NODE_BLOCK, NODE_BREAK, NODE_FALSE, NODE_LIT, NODE_NEXT, NODE_NIL, NODE_REDO, NODE_RETRY, NODE_RETURN, NODE_SELF, NODE_STR, NODE_TRUE, parser_warning, RTEST, and ruby_verbose.
static void block_dup_check_gen | ( | struct parser_params * | parser, | |
NODE * | node1, | |||
NODE * | node2 | |||
) | [static] |
Definition at line 14326 of file parse.c.
References compile_error, nd_type, NODE_BLOCK_PASS, and PARSER_ARG.
static NODE * call_bin_op_gen | ( | struct parser_params * | parser, | |
NODE * | recv, | |||
ID | id, | |||
NODE * | arg1 | |||
) | [static] |
Definition at line 14101 of file parse.c.
References NEW_CALL, NEW_LIST, and value_expr.
static NODE * call_uni_op_gen | ( | struct parser_params * | parser, | |
NODE * | recv, | |||
ID | id | |||
) | [static] |
Definition at line 14109 of file parse.c.
References NEW_CALL, and value_expr.
static int comment_at_top | ( | struct parser_params * | parser | ) | [static] |
Definition at line 12285 of file parse.c.
References parser_params::has_shebang, ISSPACE, lex_p, and parser_params::line_count.
Referenced by magic_comment_encoding(), and parser_yylex().
static NODE * cond0 | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14797 of file parse.c.
References assign_in_cond(), e_option_supplied(), literal_node(), nd_set_type, nd_type, NEW_GVAR, NEW_MATCH2, NODE_AND, NODE_DOT2, NODE_DOT3, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_EVSTR, NODE_FLIP2, NODE_FLIP3, NODE_LIT, NODE_MATCH, NODE_OR, NODE_STR, parser_warn, parser_warning, range_op(), rb_intern, rb_warn0, RTEST, ruby_verbose, T_REGEXP, TYPE, warn_unless_e_option(), and warning_unless_e_option().
Referenced by cond_gen(), and range_op().
static NODE * cond_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
static VALUE coverage | ( | const char * | f, | |
int | n | |||
) | [static] |
Definition at line 11132 of file parse.c.
References RARRAY, RARRAY_PTR, rb_ary_new2(), rb_get_coverages(), rb_hash_aset(), rb_str_new2(), RBASIC, and RTEST.
Referenced by yycompile0().
static VALUE debug_lines | ( | const char * | f | ) | [static] |
Definition at line 11115 of file parse.c.
References CONST_ID, hash(), rb_ary_new(), rb_cObject, rb_const_defined_at(), rb_const_get_at(), rb_hash_aset(), rb_str_new2(), T_HASH, and TYPE.
Referenced by yycompile0().
static void dispose_string | ( | VALUE | str | ) | [static] |
Definition at line 11793 of file parse.c.
References rb_gc_force_recycle(), RBASIC, RSTRING_NOEMBED, RSTRING_PTR, and xfree().
Referenced by parser_here_document(), and parser_heredoc_restore().
static int dvar_curr_gen | ( | struct parser_params * | parser, | |
ID | id | |||
) | [static] |
Definition at line 15129 of file parse.c.
References lvtbl, and vtable_included().
static int dvar_defined_gen | ( | struct parser_params * | parser, | |
ID | id | |||
) | [static] |
Definition at line 15103 of file parse.c.
References DVARS_INHERIT, lvtbl, POINTER_P, vtable::prev, rb_dvar_defined(), and vtable_included().
static int dyna_in_block_gen | ( | struct parser_params * | parser | ) | [static] |
static void dyna_pop_1 | ( | struct parser_params * | parser | ) | [static] |
Definition at line 15070 of file parse.c.
References lvtbl, and vtable_free().
Referenced by dyna_pop_gen().
static void dyna_pop_gen | ( | struct parser_params * | parser, | |
const struct vtable * | lvargs | |||
) | [static] |
Definition at line 15083 of file parse.c.
References dyna_pop_1(), lvtbl, and xfree().
static struct vtable * dyna_push_gen | ( | struct parser_params * | parser | ) | [static, read] |
Definition at line 15062 of file parse.c.
References lvtbl, and vtable_alloc().
static int e_option_supplied | ( | struct parser_params * | parser | ) | [static] |
Definition at line 11150 of file parse.c.
References ruby_sourcefile.
Referenced by cond0(), warn_unless_e_option(), warning_unless_e_option(), and yycompile0().
static NODE * evstr2dstr_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14078 of file parse.c.
References list_append, nd_type, NEW_DSTR, NODE_EVSTR, and Qnil.
Definition at line 13879 of file parse.c.
References nd_line, and nd_set_line.
static void fixup_nodes | ( | NODE ** | rootnode | ) | [static] |
Definition at line 14729 of file parse.c.
References nd_set_type, nd_type, NODE_DOT2, NODE_DOT3, NODE_LIT, rb_gc_force_recycle(), rb_range_new(), and type.
Referenced by yyparse().
static ID formal_argument_gen | ( | struct parser_params * | parser, | |
ID | lhs | |||
) | [static] |
Definition at line 12223 of file parse.c.
References is_local_id, shadowing_lvar, and yyerror.
static NODE * gettable_gen | ( | struct parser_params * | parser, | |
ID | id | |||
) | [static] |
Definition at line 14150 of file parse.c.
References compile_error, dvar_defined, dyna_in_block, parser_params::enc, INT2FIX, is_class_id, is_const_id, is_global_id, is_instance_id, is_local_id, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, local_id, NEW_CONST, NEW_CVAR, NEW_DVAR, NEW_FALSE, NEW_GVAR, NEW_IVAR, NEW_LIT, NEW_LVAR, NEW_NIL, NEW_SELF, NEW_STR, NEW_TRUE, NEW_VCALL, PARSER_ARG, rb_enc_from_encoding(), rb_external_str_new_with_enc(), rb_filesystem_encoding(), rb_id2name(), ruby_sourcefile, and ruby_sourceline.
void Init_sym | ( | void | ) |
Definition at line 15451 of file parse.c.
References global_symbols, symbols::id_str, Init_id(), st_init_numtable_with_size(), st_init_table_with_size(), and symbols::sym_id.
static ID internal_id_gen | ( | struct parser_params * | parser | ) | [static] |
Definition at line 15473 of file parse.c.
References ID_INTERNAL, ID_SCOPE_SHIFT, lvtbl, tLAST_TOKEN, and vtable_size().
static int is_special_global_name | ( | const char * | m, | |
const char * | e, | |||
rb_encoding * | enc | |||
) | [static] |
Definition at line 15482 of file parse.c.
References is_identchar, ISASCII, rb_enc_isdigit, and rb_enc_mbclen().
Referenced by rb_enc_symname2_p(), and rb_intern3().
static VALUE lex_get_str | ( | struct parser_params * | parser, | |
VALUE | s | |||
) | [static] |
Definition at line 11220 of file parse.c.
References parser_params::enc, lex_gets_ptr, must_be_ascii_compatible(), rb_enc_str_new(), RSTRING_LEN, and RSTRING_PTR.
static VALUE lex_getline | ( | struct parser_params * | parser | ) | [static] |
Definition at line 11240 of file parse.c.
References must_be_ascii_compatible(), NIL_P, parser_params::parser_lex_gets, parser_params::parser_lex_input, Qnil, rb_ary_push(), ruby_coverage, and ruby_debug_lines.
Referenced by parser_nextc().
static VALUE lex_io_gets | ( | struct parser_params * | parser, | |
VALUE | io | |||
) | [static] |
Definition at line 11308 of file parse.c.
References rb_io_gets().
static NODE * list_append_gen | ( | struct parser_params * | parser, | |
NODE * | list, | |||
NODE * | item | |||
) | [static] |
static NODE * list_concat_gen | ( | struct parser_params * | parser, | |
NODE * | head, | |||
NODE * | tail | |||
) | [static] |
static int literal_concat0 | ( | struct parser_params * | parser, | |
VALUE | head, | |||
VALUE | tail | |||
) | [static] |
Definition at line 14000 of file parse.c.
References compile_error, NIL_P, PARSER_ARG, rb_enc_compatible(), rb_enc_get(), rb_enc_name, rb_str_buf_append(), and rb_str_resize().
Referenced by literal_concat_gen(), and yyparse().
static NODE * literal_concat_gen | ( | struct parser_params * | parser, | |
NODE * | head, | |||
NODE * | tail | |||
) | [static] |
Definition at line 14017 of file parse.c.
References list_append, list_concat, literal_concat0(), nd_set_type, nd_type, NEW_DSTR, NEW_STR, NIL_P, NODE_ARRAY, NODE_DSTR, NODE_EVSTR, NODE_STR, Qnil, and rb_gc_force_recycle().
static int literal_node | ( | NODE * | node | ) | [static] |
Definition at line 14776 of file parse.c.
References nd_type, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_EVSTR, NODE_FALSE, NODE_LIT, NODE_NIL, NODE_STR, and NODE_TRUE.
Referenced by cond0().
static int local_id_gen | ( | struct parser_params * | parser, | |
ID | id | |||
) | [static] |
Definition at line 15040 of file parse.c.
References DVARS_INHERIT, lvtbl, POINTER_P, vtable::prev, rb_local_defined(), and vtable_included().
static void local_pop_gen | ( | struct parser_params * | parser | ) | [static] |
Definition at line 14985 of file parse.c.
References lvtbl, vtable_free(), and xfree().
static void local_push_gen | ( | struct parser_params * | parser, | |
int | inherit_dvars | |||
) | [static] |
Definition at line 14973 of file parse.c.
References ALLOC, local_vars::args, DVARS_INHERIT, DVARS_TOPSCOPE, lvtbl, local_vars::prev, local_vars::vars, and vtable_alloc().
static ID * local_tbl_gen | ( | struct parser_params * | parser | ) | [static] |
Definition at line 15011 of file parse.c.
References ALLOC_N, buf, cnt, lvtbl, vtable_size(), and vtable_tblcpy().
static int local_var_gen | ( | struct parser_params * | parser, | |
ID | id | |||
) | [static] |
Definition at line 15033 of file parse.c.
References lvtbl, vtable_add(), and vtable_size().
static NODE * logop_gen | ( | struct parser_params * | parser, | |
enum node_type | type, | |||
NODE * | left, | |||
NODE * | right | |||
) | [static] |
Definition at line 14861 of file parse.c.
References nd_type, NEW_NODE, and value_expr.
static int lvar_defined_gen | ( | struct parser_params * | parser, | |
ID | id | |||
) | [static] |
Definition at line 12234 of file parse.c.
References dvar_defined, dyna_in_block, and local_id.
static void magic_comment_encoding | ( | struct parser_params * | parser, | |
const char * | name, | |||
const char * | val | |||
) | [static] |
Definition at line 12301 of file parse.c.
References comment_at_top(), and parser_set_encode().
static const char* magic_comment_marker | ( | const char * | str, | |
long | len | |||
) | [static] |
Definition at line 12322 of file parse.c.
Referenced by parser_magic_comment().
static NODE * match_op_gen | ( | struct parser_params * | parser, | |
NODE * | node1, | |||
NODE * | node2 | |||
) | [static] |
Definition at line 14116 of file parse.c.
References nd_type, NEW_CALL, NEW_LIST, NEW_MATCH2, NEW_MATCH3, NODE_DREGX, NODE_DREGX_ONCE, NODE_LIT, T_REGEXP, tMATCH, TYPE, and value_expr.
static rb_encoding* must_be_ascii_compatible | ( | VALUE | s | ) | [static] |
Definition at line 11210 of file parse.c.
References parser_params::enc, rb_eArgError, rb_enc_asciicompat, rb_enc_get(), and rb_raise().
Referenced by lex_get_str(), lex_getline(), rb_compile_string(), and rb_parser_compile_string().
static NODE * new_args_gen | ( | struct parser_params * | parser, | |
NODE * | m, | |||
NODE * | o, | |||
ID | r, | |||
NODE * | p, | |||
ID | b | |||
) | [static] |
Definition at line 14947 of file parse.c.
References NEW_ARGS, NEW_ARGS_AUX, NEW_NODE, NODE_AND, and ruby_sourceline.
static void new_bv_gen | ( | struct parser_params * | parser, | |
ID | name | |||
) | [static] |
Definition at line 14304 of file parse.c.
References compile_error, dyna_var, is_local_id, PARSER_ARG, rb_id2name(), and shadowing_lvar.
static NODE * new_evstr_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
static NODE * new_yield_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14901 of file parse.c.
References nd_type, NEW_YIELD, no_blockarg(), and NODE_SPLAT.
Definition at line 13869 of file parse.c.
References RNode::flags, and remove_begin().
Referenced by reg_named_capture_assign_gen(), reg_named_capture_assign_iter(), and yyparse().
static void no_blockarg | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14876 of file parse.c.
References compile_error, nd_type, NODE_BLOCK_PASS, and PARSER_ARG.
Referenced by new_yield_gen(), and ret_args_gen().
static NODE * node_assign_gen | ( | struct parser_params * | parser, | |
NODE * | lhs, | |||
NODE * | rhs | |||
) | [static] |
Definition at line 14414 of file parse.c.
References arg_append, nd_type, NODE_ATTRASGN, NODE_CALL, NODE_CDECL, NODE_CVASGN, NODE_DASGN, NODE_DASGN_CURR, NODE_GASGN, NODE_IASGN, NODE_IASGN2, NODE_LASGN, and NODE_MASGN.
static NODE * node_newnode | ( | struct parser_params * | parser, | |
enum node_type | type, | |||
VALUE | a0, | |||
VALUE | a1, | |||
VALUE | a2 | |||
) | [static] |
Definition at line 13849 of file parse.c.
References nd_set_line, and ruby_sourceline.
static NODE* parser_compile_string | ( | volatile VALUE | vparser, | |
const char * | f, | |||
VALUE | s, | |||
int | line | |||
) | [static] |
Definition at line 11260 of file parse.c.
References compile_for_eval, lex_gets, lex_gets_ptr, lex_input, lex_p, lex_pbeg, lex_pend, rb_parse_in_eval(), TypedData_Get_Struct, and yycompile().
Referenced by rb_compile_cstr(), rb_compile_string(), rb_parser_compile_cstr(), and rb_parser_compile_string().
static long parser_encode_length | ( | struct parser_params * | parser, | |
const char * | name, | |||
long | len | |||
) | [static] |
Definition at line 12241 of file parse.c.
References rb_memcicmp().
Referenced by set_file_encoding().
static void parser_free | ( | void * | ptr | ) | [static] |
Definition at line 15990 of file parse.c.
References parser_params::parser_lvtbl, parser_params::parser_ruby_sourcefile, parser_params::parser_tokenbuf, local_vars::prev, local_vars::vars, and xfree().
static int parser_here_document | ( | struct parser_params * | parser, | |
NODE * | here | |||
) | [static] |
Definition at line 12101 of file parse.c.
References compile_error, dispose_string(), parser_params::enc, parser_params::eofp, func, heredoc_restore, len, lex_goto_eol, lex_lastline, lex_p, lex_pend, lex_strterm, NEW_STRTERM, newtok, nextc, NIL_P, NULL, PARSER_ARG, pushback, rb_str_append(), rb_str_cat(), RSTRING_LEN, RSTRING_PTR, set_yylval_str, STR_FUNC_EXPAND, STR_FUNC_INDENT, STR_NEW, STR_NEW3, tHEREDOC_END, tok, tokadd, tokadd_string, toklen, tSTRING_CONTENT, was_bol, and whole_match_p.
static int parser_heredoc_identifier | ( | struct parser_params * | parser | ) | [static] |
Definition at line 12006 of file parse.c.
References compile_error, func, len, lex_goto_eol, lex_lastline, lex_p, lex_strterm, nd_set_line, newtok, nextc, NODE_HEREDOC, PARSER_ARG, parser_is_identchar, pushback, rb_node_newnode, ripper_flush, ruby_sourceline, str_dquote, STR_FUNC_INDENT, STR_NEW, tHEREDOC_BEG, tok, tokadd, tokadd_mbchar, tokfix, toklen, and tXSTRING_BEG.
static void parser_heredoc_restore | ( | struct parser_params * | parser, | |
NODE * | here | |||
) | [static] |
Definition at line 12069 of file parse.c.
References dispose_string(), heredoc_end, lex_lastline, lex_p, lex_pbeg, lex_pend, nd_line, rb_gc_force_recycle(), ripper_flush, RSTRING_LEN, RSTRING_PTR, and ruby_sourceline.
static void parser_initialize | ( | struct parser_params * | parser | ) | [static] |
Definition at line 15912 of file parse.c.
References parser_params::enc, parser_params::eofp, parser_params::heap, parser_params::is_ripper, parser_params::parser_class_nest, parser_params::parser_cmdarg_stack, parser_params::parser_command_start, parser_params::parser_compile_for_eval, parser_params::parser_cond_stack, parser_params::parser_cur_mid, parser_params::parser_deferred_nodes, parser_params::parser_eval_tree, parser_params::parser_eval_tree_begin, parser_params::parser_heredoc_end, parser_params::parser_in_def, parser_params::parser_in_defined, parser_params::parser_in_single, parser_params::parser_lex_p, parser_params::parser_lex_pbeg, parser_params::parser_lex_pend, parser_params::parser_lex_strterm, parser_params::parser_lpar_beg, parser_params::parser_lvtbl, parser_params::parser_paren_nest, parser_params::parser_ruby__end__seen, parser_params::parser_ruby_sourcefile, parser_params::parser_tokenbuf, parser_params::parser_tokidx, parser_params::parser_toksiz, and rb_usascii_encoding().
Referenced by parser_new().
static int parser_magic_comment | ( | struct parser_params * | parser, | |
const char * | str, | |||
long | len | |||
) | [static] |
Definition at line 12355 of file parse.c.
References magic_comment::func, ISSPACE, magic_comment::length, magic_comment_marker(), magic_comment::name, numberof, RSTRING_PTR, str_copy, and STRNCASECMP.
Referenced by parser_yylex().
static void parser_mark | ( | void * | ptr | ) | [static] |
Definition at line 15964 of file parse.c.
References parser_params::debug_lines, parser_params::heap, parser_params::parser_deferred_nodes, parser_params::parser_eval_tree, parser_params::parser_eval_tree_begin, parser_params::parser_lex_input, parser_params::parser_lex_lastline, parser_params::parser_lex_nextline, parser_params::parser_lex_strterm, and rb_gc_mark().
static size_t parser_memsize | ( | const void * | ptr | ) | [static] |
Definition at line 16010 of file parse.c.
References vtable::capa, parser_params::parser_lvtbl, parser_params::parser_ruby_sourcefile, parser_params::parser_toksiz, local_vars::prev, size, and local_vars::vars.
static struct parser_params* parser_new | ( | void | ) | [static, read] |
Definition at line 16050 of file parse.c.
References ALLOC_N, MEMZERO, and parser_initialize().
Referenced by rb_parser_new().
static char* parser_newtok | ( | struct parser_params * | parser | ) | [static] |
static int parser_nextc | ( | struct parser_params * | parser | ) | [inline, static] |
Definition at line 11380 of file parse.c.
References parser_params::eofp, heredoc_end, lex_getline(), lex_goto_eol, lex_input, lex_lastline, lex_nextline, lex_p, lex_pbeg, lex_pend, parser_params::line_count, NIL_P, peek, rb_str_buf_cat(), rb_str_buf_new(), ripper_flush, RSTRING_LEN, RSTRING_PTR, and ruby_sourceline.
static int parser_parse_string | ( | struct parser_params * | parser, | |
NODE * | quote | |||
) | [static] |
Definition at line 11945 of file parse.c.
References compile_error, parser_params::enc, parser_params::eofp, func, ISSPACE, nd_line, nd_paren, nd_term, newtok, nextc, PARSER_ARG, pushback, regx_options, ruby_sourceline, set_yylval_num, set_yylval_str, STR_FUNC_EXPAND, STR_FUNC_QWORDS, STR_FUNC_REGEXP, STR_NEW3, tok, tokadd, tokadd_string, tokfix, and toklen.
static void parser_prepare | ( | struct parser_params * | parser | ) | [static] |
Definition at line 12491 of file parse.c.
References parser_params::enc, EOF, parser_params::has_shebang, lex_lastline, lex_p, lex_pbeg, lex_pend, nextc, peek, pushback, rb_enc_get(), and rb_utf8_encoding().
Referenced by yycompile0().
static void parser_pushback | ( | struct parser_params * | parser, | |
int | c | |||
) | [static] |
static int parser_read_escape | ( | struct parser_params * | parser, | |
int | flags, | |||
rb_encoding ** | encp | |||
) | [static] |
Definition at line 11580 of file parse.c.
References ESCAPE_CONTROL, ESCAPE_META, ISASCII, lex_p, nextc, peek, pushback, read_escape, scan_oct, tok_hex, and yyerror.
static int parser_regx_options | ( | struct parser_params * | parser | ) | [static] |
Definition at line 11757 of file parse.c.
References compile_error, ISALPHA, newtok, nextc, options(), PARSER_ARG, pushback, rb_ascii8bit_encindex(), rb_char_to_option_kcode(), RE_OPTION_ENCODING, tok, tokadd, tokfix, and toklen.
static void parser_set_encode | ( | struct parser_params * | parser, | |
const char * | name | |||
) | [static] |
Definition at line 12259 of file parse.c.
References parser_params::enc, rb_ary_unshift(), rb_eArgError, rb_enc_asciicompat, rb_enc_find_index(), rb_enc_from_index(), rb_enc_name, rb_exc_raise(), rb_make_backtrace(), rb_make_exception(), rb_sprintf(), ruby_sourcefile, and ruby_sourceline.
Referenced by magic_comment_encoding(), and set_file_encoding().
static VALUE parser_str_new | ( | const char * | p, | |
long | n, | |||
rb_encoding * | enc, | |||
int | func, | |||
rb_encoding * | enc0 | |||
) | [static] |
Definition at line 11360 of file parse.c.
References ENC_CODERANGE_7BIT, rb_ascii8bit_encoding(), rb_enc_asciicompat, rb_enc_associate(), rb_enc_str_coderange(), rb_enc_str_new(), rb_usascii_encoding(), rb_utf8_encoding(), and STR_FUNC_REGEXP.
static int parser_tok_hex | ( | struct parser_params * | parser, | |
size_t * | numlen | |||
) | [static] |
static void parser_tokadd | ( | struct parser_params * | parser, | |
int | c | |||
) | [static] |
static int parser_tokadd_escape | ( | struct parser_params * | parser, | |
rb_encoding ** | encp | |||
) | [static] |
Definition at line 11680 of file parse.c.
References ESCAPE_CONTROL, ESCAPE_META, lex_p, nextc, pushback, ruby_scan_oct(), tok_hex, tokadd, tokcopy, and yyerror.
static int parser_tokadd_mbchar | ( | struct parser_params * | parser, | |
int | c | |||
) | [static] |
Definition at line 11802 of file parse.c.
References compile_error, len, lex_p, MBCLEN_CHARFOUND_P, PARSER_ARG, parser_encoding_name, parser_precise_mbclen, tokadd, and tokcopy.
static int parser_tokadd_string | ( | struct parser_params * | parser, | |
int | func, | |||
int | term, | |||
int | paren, | |||
long * | nest, | |||
rb_encoding ** | encp | |||
) | [static] |
Definition at line 11818 of file parse.c.
References parser_params::enc, ISSPACE, lex_p, lex_pend, mixed_error, mixed_escape, nextc, parser_isascii, parser_tokadd_utf8(), pushback, read_escape, STR_FUNC_ESCAPE, STR_FUNC_EXPAND, STR_FUNC_QWORDS, STR_FUNC_REGEXP, STR_FUNC_SYMBOL, tokadd, tokadd_escape, and tokadd_mbchar.
static int parser_tokadd_utf8 | ( | struct parser_params * | parser, | |
rb_encoding ** | encp, | |||
int | string_literal, | |||
int | symbol_literal, | |||
int | regexp_literal | |||
) | [static] |
static void parser_tokaddmbc | ( | struct parser_params * | parser, | |
int | c, | |||
rb_encoding * | enc | |||
) | [static] |
Definition at line 11673 of file parse.c.
References len, rb_enc_codelen(), rb_enc_mbcput, and tokspace.
static char* parser_tokspace | ( | struct parser_params * | parser, | |
int | n | |||
) | [static] |
static void parser_warn | ( | struct parser_params * | parser, | |
NODE * | node, | |||
const char * | mesg | |||
) | [static] |
Definition at line 13895 of file parse.c.
References nd_line, rb_compile_warn(), and ruby_sourcefile.
static void parser_warning | ( | struct parser_params * | parser, | |
NODE * | node, | |||
const char * | mesg | |||
) | [static] |
Definition at line 13888 of file parse.c.
References nd_line, rb_compile_warning(), and ruby_sourcefile.
static int parser_whole_match_p | ( | struct parser_params * | parser, | |
const char * | eos, | |||
long | len, | |||
int | indent | |||
) | [static] |
static int parser_yyerror | ( | struct parser_params * | parser, | |
const char * | msg | |||
) | [static] |
Definition at line 11048 of file parse.c.
References ALLOCA_N, buf, compile_error, len, lex_lastline, lex_p, lex_pbeg, lex_pend, MEMCPY, PARSER_ARG, rb_compile_error_append(), rb_enc_get(), rb_enc_prev_char, and STR_NEW2.
Referenced by yyparse().
static int parser_yylex | ( | struct parser_params * | parser | ) | [static] |
Definition at line 12535 of file parse.c.
References arg_ambiguous, CMDARG_LEXPOP, CMDARG_P, CMDARG_PUSH, command_start, comment_at_top(), compile_error, COND_LEXPOP, COND_P, COND_PUSH, DBL2NUM, parser_params::enc, ENC_CODERANGE_7BIT, ENC_SINGLE, parser_params::eofp, errno, EXPR_BEG, EXPR_CLASS, EXPR_CMDARG, EXPR_DOT, EXPR_END, EXPR_ENDARG, EXPR_ENDFN, EXPR_FNAME, EXPR_VALUE, FALSE, here_document, heredoc_identifier, kwtable::id, INT2FIX, IS_ARG, IS_BEG, IS_END, is_identchar, is_local_id, IS_SPCARG, ISALNUM, ISASCII, ISDIGIT, ISSPACE, ISUPPER, ISXDIGIT, k__END__, keyword_do, lex_goto_eol, lex_nextline, lex_p, lex_pend, lex_state, lex_strterm, lpar_beg, lvar_defined, kwtable::name, nd_type, NEW_BACK_REF, NEW_NTH_REF, NEW_STRTERM, newtok, nextc, no_digits, NODE_HEREDOC, paren_nest, parse_string, PARSER_ARG, parser_is_identchar, parser_isascii, parser_magic_comment(), parser_tokadd_utf8(), peek, pushback, rb_compile_error(), rb_cstr_to_inum(), rb_enc_isalnum, rb_enc_isspace, rb_gc_force_recycle(), rb_intern, rb_reserved_word, rb_warnI, rb_warning0, rb_warningS, read_escape, result, ruby__end__seen, set_file_encoding(), set_yylval_id, set_yylval_literal, set_yylval_name, set_yylval_node, set_yylval_str, snprintf, kwtable::state, str_dquote, str_dsym, str_dword, STR_NEW3, str_regexp, str_squote, str_ssym, str_sword, str_xquote, strtod, tANDOP, tCOMMENT, tEMBDOC, tEMBDOC_BEG, tEMBDOC_END, tIGNORED_NL, tLBRACE, tLSHFT, tok, TOK_INTERN, tokadd, tokadd_mbchar, tokaddmbc, token, tokfix, tokidx, toklast, toklen, tOROP, tPOW, tREGEXP_END, tRSHFT, tSP, tSTRING_END, warn_balanced, was_bol, whole_match_p, and yyerror.
Referenced by yylex().
static NODE* range_op | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
static void rb_backref_error_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14350 of file parse.c.
References compile_error, nd_type, NODE_BACK_REF, NODE_NTH_REF, and PARSER_ARG.
int rb_char_to_option_kcode | ( | int | c, | |
int * | option, | |||
int * | kcode | |||
) |
Definition at line 284 of file re.c.
References ARG_ENCODING_NONE, char_to_option(), rb_ascii8bit_encindex(), rb_enc_find_index(), and rb_utf8_encindex().
NODE* rb_compile_cstr | ( | const char * | f, | |
const char * | s, | |||
int | len, | |||
int | line | |||
) |
Definition at line 11294 of file parse.c.
References parser_compile_string(), rb_parser_new(), and rb_str_new().
Definition at line 11314 of file parse.c.
References rb_parser_compile_file(), and rb_parser_new().
Definition at line 11280 of file parse.c.
References must_be_ascii_compatible(), parser_compile_string(), and rb_parser_new().
int rb_dvar_defined | ( | ID | ) |
Definition at line 5441 of file compile.c.
References rb_thread_struct::base_block, GET_THREAD, rb_block_struct::iseq, ISEQ_TYPE_BLOCK, ISEQ_TYPE_ENSURE, ISEQ_TYPE_EVAL, ISEQ_TYPE_MAIN, ISEQ_TYPE_RESCUE, rb_iseq_struct::local_table, rb_iseq_struct::local_table_size, rb_iseq_struct::parent_iseq, and rb_iseq_struct::type.
Referenced by dvar_defined_gen().
int rb_enc_symname2_p | ( | const char * | name, | |
long | len, | |||
rb_encoding * | enc | |||
) |
Definition at line 15525 of file parse.c.
References is_identchar, is_special_global_name(), ISASCII, rb_enc_isalpha, rb_enc_isupper, and rb_enc_mbclen().
int rb_enc_symname_p | ( | const char * | name, | |
rb_encoding * | enc | |||
) |
Definition at line 15519 of file parse.c.
References rb_enc_symname2_p().
void rb_gc_mark_symbols | ( | void | ) |
Definition at line 15464 of file parse.c.
References global_symbols, symbols::id_str, symbols::op_sym, rb_gc_mark_locations, rb_mark_tbl(), and tLAST_TOKEN.
const char* rb_id2name | ( | ID | id | ) |
Definition at line 15839 of file parse.c.
References rb_id2str(), and RSTRING_PTR.
Definition at line 15778 of file parse.c.
References global_symbols, ID_CONST, ID_LOCAL, symbols::id_str, is_attrset_id, is_local_id, OBJ_FREEZE, symbols::op_sym, op_tbl, rb_cString, rb_id2str(), rb_intern_str(), rb_ispunct(), rb_str_cat(), rb_str_dup(), rb_usascii_str_new(), rb_usascii_str_new2(), RBASIC, st_lookup(), tLAST_TOKEN, and token.
ID rb_intern | ( | const char * | name | ) |
Definition at line 15755 of file parse.c.
References rb_intern, and rb_intern2().
ID rb_intern2 | ( | const char * | name, | |
long | len | |||
) |
Definition at line 15748 of file parse.c.
References rb_intern3(), and rb_usascii_encoding().
ID rb_intern3 | ( | const char * | name, | |
long | len, | |||
rb_encoding * | enc | |||
) |
Definition at line 15618 of file parse.c.
References RString::as, RString::basic, ENC_CODERANGE_BROKEN, RBasic::flags, global_symbols, RString::heap, ID_SCOPE_SHIFT, is_attrset_id, is_identchar, is_special_global_name(), ISASCII, RBasic::klass, last, symbols::last_id, op_tbl, rb_ascii8bit_encoding(), rb_cString, rb_eEncodingError, rb_enc_asciicompat, rb_enc_associate(), rb_enc_get(), rb_enc_isascii, rb_enc_isdigit, rb_enc_ispunct, rb_enc_isupper, rb_enc_mbclen(), rb_enc_str_coderange(), rb_eRuntimeError, rb_id2str(), rb_id_attrset(), rb_intern3(), rb_raise(), rb_usascii_encoding(), register_symid(), RSTRING_NOEMBED, RUBY_SPECIAL_SHIFT, st_lookup(), symbols::sym_id, T_STRING, and tLAST_TOKEN.
Definition at line 15761 of file parse.c.
References ENC_CODERANGE_7BIT, rb_enc_get(), rb_enc_str_coderange(), RB_GC_GUARD, rb_intern3(), rb_usascii_encoding(), RSTRING_LEN, and RSTRING_PTR.
int rb_is_class_id | ( | ID | id | ) |
Definition at line 15886 of file parse.c.
References is_class_id.
int rb_is_const_id | ( | ID | id | ) |
Definition at line 15880 of file parse.c.
References is_const_id.
int rb_is_instance_id | ( | ID | id | ) |
Definition at line 15892 of file parse.c.
References is_instance_id.
int rb_is_junk_id | ( | ID | id | ) |
Definition at line 15904 of file parse.c.
References is_junk_id.
int rb_is_local_id | ( | ID | id | ) |
Definition at line 15898 of file parse.c.
References is_local_id.
int rb_local_defined | ( | ID | ) |
Definition at line 5466 of file compile.c.
References rb_thread_struct::base_block, GET_THREAD, rb_block_struct::iseq, rb_iseq_struct::local_iseq, rb_iseq_struct::local_table, and rb_iseq_struct::local_table_size.
Referenced by local_id_gen().
int rb_parse_in_eval | ( | void | ) |
Definition at line 5485 of file compile.c.
References GET_THREAD.
Referenced by parser_compile_string(), and rb_parser_compile_file().
int rb_parse_in_main | ( | void | ) |
Definition at line 15303 of file parse.c.
References block_append, nd_type, NEW_ARRAY, NEW_FCALL, NEW_GVAR, NODE_PRELUDE, rb_intern, and TypedData_Get_Struct.
NODE* rb_parser_compile_cstr | ( | volatile VALUE | vparser, | |
const char * | f, | |||
const char * | s, | |||
int | len, | |||
int | line | |||
) |
Definition at line 11301 of file parse.c.
References parser_compile_string(), and rb_str_new().
Definition at line 11322 of file parse.c.
References compile_for_eval, lex_gets, lex_input, lex_p, lex_pbeg, lex_pend, rb_parse_in_eval(), TypedData_Get_Struct, and yycompile().
Definition at line 11287 of file parse.c.
References must_be_ascii_compatible(), and parser_compile_string().
Definition at line 16091 of file parse.c.
References parser_params::enc, rb_enc_from_encoding(), and TypedData_Get_Struct.
Definition at line 16076 of file parse.c.
References Qtrue, ruby__end__seen, and TypedData_Get_Struct.
Definition at line 16106 of file parse.c.
References Qtrue, and TypedData_Get_Struct.
VALUE rb_parser_new | ( | void | ) |
Definition at line 16061 of file parse.c.
References parser_new(), and TypedData_Wrap_Struct.
Definition at line 16121 of file parse.c.
References RTEST, and TypedData_Get_Struct.
Definition at line 15335 of file parse.c.
References block_append, nd_type, NEW_CALL, NEW_GASGN, NEW_GVAR, NEW_OPT_N, NODE_PRELUDE, rb_intern, and TypedData_Get_Struct.
Definition at line 2290 of file re.c.
References buf, err, Qnil, rb_enc_get(), RB_GC_GUARD, rb_reg_error_desc(), rb_reg_preprocess(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Definition at line 2516 of file re.c.
References err, FL_SET, rb_reg_alloc(), rb_reg_error_desc(), rb_reg_initialize_str(), rb_set_errinfo(), rb_str_new(), and REG_LITERAL.
struct kwtable* rb_reserved_word | ( | const char * | str, | |
unsigned int | len | |||
) | [read] |
Definition at line 16044 of file parse.c.
References reserved_word().
VALUE rb_sym_all_symbols | ( | void | ) |
Definition at line 15871 of file parse.c.
References RString::ary, global_symbols, st_table::num_entries, rb_ary_new2(), st_foreach(), symbols::sym_id, and symbols_i().
int rb_symname_p | ( | const char * | name | ) |
Definition at line 15513 of file parse.c.
References rb_ascii8bit_encoding(), and rb_enc_symname_p().
static void reduce_nodes_gen | ( | struct parser_params * | parser, | |
NODE ** | body | |||
) | [static] |
Definition at line 14620 of file parse.c.
References RNode::flags, nd_body, nd_else, nd_head, nd_next, nd_resq, nd_type, NEW_NIL, NODE_BEGIN, NODE_BLOCK, NODE_CASE, NODE_ENSURE, NODE_FL_NEWLINE, NODE_IF, NODE_NIL, NODE_RESCUE, NODE_RETURN, NODE_WHEN, and subnodes.
static VALUE reg_compile_gen | ( | struct parser_params * | parser, | |
VALUE | str, | |||
int | options | |||
) | [static] |
Definition at line 15274 of file parse.c.
References compile_error, err, NIL_P, PARSER_ARG, rb_attr_get(), rb_errinfo, rb_intern, rb_reg_compile(), rb_set_errinfo(), rb_str_append(), rb_str_cat(), RE_OPTION_MASK, reg_fragment_setenc, RSTRING_PTR, ruby_sourcefile, and ruby_sourceline.
static int reg_fragment_check_gen | ( | struct parser_params * | parser, | |
VALUE | str, | |||
int | options | |||
) | [static] |
Definition at line 15179 of file parse.c.
References compile_error, err, PARSER_ARG, Qnil, RB_GC_GUARD, rb_obj_as_string(), rb_reg_check_preprocess(), reg_fragment_setenc, and RSTRING_PTR.
static void reg_fragment_setenc_gen | ( | struct parser_params * | parser, | |
VALUE | str, | |||
int | options | |||
) | [static] |
Definition at line 15140 of file parse.c.
References compile_error, parser_params::enc, ENC_CODERANGE_7BIT, ENCODING_GET, ENCODING_IS_ASCII8BIT, ENCODING_SET, PARSER_ARG, rb_ascii8bit_encoding(), rb_char_to_option_kcode(), rb_enc_associate(), rb_enc_get(), rb_enc_name, rb_enc_str_coderange(), rb_usascii_encoding(), RE_OPTION_ENCODING_IDX, and RE_OPTION_ENCODING_NONE.
static NODE * reg_named_capture_assign_gen | ( | struct parser_params * | parser, | |
VALUE | regexp, | |||
NODE * | match | |||
) | [static] |
Definition at line 15242 of file parse.c.
References block_append, reg_named_capture_assign_t::enc, reg_named_capture_assign_t::fail_block, gettable, INT2FIX, NEW_CALL, NEW_IF, NEW_LIST, NEW_LIT, newline_node(), reg_named_capture_assign_t::num, onig_foreach_name(), reg_named_capture_assign_t::parser, Qnil, rb_enc_get(), rb_intern, reg_named_capture_assign_iter(), RREGEXP, and reg_named_capture_assign_t::succ_block.
static int reg_named_capture_assign_iter | ( | const OnigUChar * | name, | |
const OnigUChar * | name_end, | |||
int | back_num, | |||
int * | back_refs, | |||
OnigRegex | regex, | |||
void * | arg0 | |||
) | [static] |
Definition at line 15202 of file parse.c.
References assignable, block_append, dvar_defined, reg_named_capture_assign_t::enc, parser_params::enc, reg_named_capture_assign_t::fail_block, gettable, ID2SYM, idAREF, ISASCII, len, local_id, MAX_WORD_LENGTH, NEW_BEGIN, NEW_CALL, NEW_LIST, NEW_LIT, newline_node(), node_assign, reg_named_capture_assign_t::num, reg_named_capture_assign_t::parser, Qnil, rb_enc_islower, rb_enc_symname2_p(), rb_id2name(), rb_intern, rb_intern3(), rb_reserved_word, rb_warningS, and reg_named_capture_assign_t::succ_block.
Referenced by reg_named_capture_assign_gen().
static ID register_symid | ( | ID | id, | |
const char * | name, | |||
long | len, | |||
rb_encoding * | enc | |||
) | [static] |
Definition at line 15608 of file parse.c.
References global_symbols, symbols::id_str, OBJ_FREEZE, rb_enc_str_new(), st_add_direct(), and symbols::sym_id.
Referenced by rb_intern3().
Definition at line 14610 of file parse.c.
References nd_type, and NODE_BEGIN.
Referenced by newline_node(), and yyparse().
static NODE * ret_args_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14884 of file parse.c.
References nd_set_type, nd_type, no_blockarg(), NODE_ARRAY, and NODE_VALUES.
Definition at line 4088 of file thread.c.
References EXEC_TAG, GET_THREAD, JUMP_TAG, POP_TAG, PUSH_TAG, rb_threadptr_reset_raised(), rb_threadptr_set_raised(), result, and rb_thread_struct::tracing.
static void set_file_encoding | ( | struct parser_params * | parser, | |
const char * | str, | |||
const char * | send | |||
) | [static] |
Definition at line 12448 of file parse.c.
References ISALNUM, ISSPACE, parser_encode_length(), parser_set_encode(), rb_str_new(), rb_str_resize(), RSTRING_PTR, and STRNCASECMP.
Referenced by parser_yylex().
static ID shadowing_lvar_gen | ( | struct parser_params * | parser, | |
ID | name | |||
) | [static] |
Definition at line 14280 of file parse.c.
References CONST_ID, dvar_curr, dvar_defined, dyna_in_block, local_id, lvtbl, rb_id2name(), rb_warningS, vtable_add(), and yyerror.
Definition at line 14406 of file parse.c.
References nd_type, NODE_ARRAY, and NODE_SPLAT.
Referenced by yyparse().
Definition at line 15848 of file parse.c.
References ID2SYM, and rb_ary_push().
Referenced by rb_sym_all_symbols().
static int token_info_get_column | ( | struct parser_params * | parser, | |
const char * | token | |||
) | [static] |
Definition at line 10977 of file parse.c.
References lex_p, and lex_pbeg.
Referenced by token_info_pop(), and token_info_push().
static int token_info_has_nonspaces | ( | struct parser_params * | parser, | |
const char * | token | |||
) | [static] |
Definition at line 10991 of file parse.c.
References lex_p, and lex_pbeg.
Referenced by token_info_pop(), and token_info_push().
static void token_info_pop | ( | struct parser_params * | parser, | |
const char * | token | |||
) | [static] |
Definition at line 11021 of file parse.c.
References token_info::column, token_info::linenum, token_info::next, token_info::nonspc, parser_params::parser_token_info, rb_compile_warning(), ruby_sourcefile, token_info::token, token_info_get_column(), token_info_has_nonspaces(), and xfree().
static void token_info_push | ( | struct parser_params * | parser, | |
const char * | token | |||
) | [static] |
Definition at line 11004 of file parse.c.
References ALLOC, token_info::column, compile_for_eval, token_info::linenum, token_info::next, token_info::nonspc, parser_params::parser_token_info, token_info::token, token_info_get_column(), and token_info_has_nonspaces().
static int value_expr_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14445 of file parse.c.
References cond, nd_type, NODE_AND, NODE_BEGIN, NODE_BLOCK, NODE_BREAK, NODE_DEFN, NODE_DEFS, NODE_IF, NODE_NEXT, NODE_OR, NODE_REDO, NODE_RETRY, NODE_RETURN, parser_warning, rb_warning0, value_expr, and yyerror.
static void void_expr_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14507 of file parse.c.
References nd_line, nd_type, NODE_BACK_REF, NODE_CALL, NODE_COLON2, NODE_COLON3, NODE_CONST, NODE_CVAR, NODE_DEFINED, NODE_DOT2, NODE_DOT3, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DVAR, NODE_FALSE, NODE_GVAR, NODE_IVAR, NODE_LIT, NODE_LVAR, NODE_NIL, NODE_NTH_REF, NODE_SELF, NODE_STR, NODE_TRUE, rb_id2name(), rb_warnS, RTEST, ruby_sourceline, ruby_verbose, tCMP, tEQ, tGEQ, tLEQ, tNEQ, tPOW, tUMINUS, and tUPLUS.
static void void_stmts_gen | ( | struct parser_params * | parser, | |
NODE * | node | |||
) | [static] |
Definition at line 14596 of file parse.c.
References nd_type, NODE_BLOCK, RTEST, ruby_verbose, and void_expr0.
Definition at line 207 of file parse.c.
References POINTER_P, rb_bug(), rb_id2name(), REALLOC_N, and VTBL_DEBUG.
Referenced by arg_var_gen(), local_var_gen(), and shadowing_lvar_gen().
Definition at line 183 of file parse.c.
References ALLOC, ALLOC_N, vtable::capa, vtable::pos, vtable::prev, vtable::tbl, and VTBL_DEBUG.
Referenced by dyna_push_gen(), and local_push_gen().
static void vtable_free | ( | struct vtable * | tbl | ) | [static] |
Definition at line 195 of file parse.c.
References POINTER_P, VTBL_DEBUG, and xfree().
Referenced by dyna_pop_1(), and local_pop_gen().
Definition at line 222 of file parse.c.
References POINTER_P, vtable::pos, and vtable::tbl.
Referenced by dvar_curr_gen(), dvar_defined_gen(), and local_id_gen().
static int vtable_size | ( | const struct vtable * | tbl | ) | [static] |
Definition at line 170 of file parse.c.
References POINTER_P, and vtable::pos.
Referenced by arg_var_gen(), internal_id_gen(), local_tbl_gen(), local_var_gen(), and vtable_tblcpy().
Definition at line 14996 of file parse.c.
References cnt, vtable::tbl, and vtable_size().
Referenced by local_tbl_gen().
static void warn_unless_e_option | ( | struct parser_params * | parser, | |
NODE * | node, | |||
const char * | str | |||
) | [static] |
Definition at line 14717 of file parse.c.
References e_option_supplied(), and parser_warn.
Referenced by cond0(), and range_op().
static void warning_unless_e_option | ( | struct parser_params * | parser, | |
NODE * | node, | |||
const char * | str | |||
) | [static] |
Definition at line 14723 of file parse.c.
References e_option_supplied(), and parser_warning.
Referenced by cond0().
static NODE* yycompile | ( | struct parser_params * | parser, | |
const char * | f, | |||
int | line | |||
) | [static] |
Definition at line 11201 of file parse.c.
References ruby_sourcefile, ruby_sourceline, ruby_strdup(), ruby_suppress_tracing(), TRUE, and yycompile0().
Referenced by parser_compile_string(), and rb_parser_compile_file().
Definition at line 11156 of file parse.c.
References compile_for_eval, coverage(), debug_lines(), deferred_nodes, e_option_supplied(), lex_lastline, lex_nextline, lex_p, lex_pbeg, lex_pend, lex_strterm, NEW_NIL, NEW_PRELUDE, parser_prepare(), rb_ary_push(), rb_safe_level, ruby_coverage, ruby_debug_lines, ruby_eval_tree_begin, ruby_sourcefile, ruby_sourceline, STR_NEW0, and yyparse.
Referenced by yycompile().
static void yydestruct | ( | char * | yymsg, | |
int | yytype, | |||
YYSTYPE * | yyvaluep, | |||
struct parser_params * | parser | |||
) | const [static] |
Definition at line 4616 of file parse.c.
References YY_SYMBOL_PRINT, and YYUSE.
Referenced by yyparse().
yylex | ( | void * | p | ) |
Definition at line 13825 of file parse.c.
References NIL_P, parser_yylex(), parser_params::parser_yylval, and YYSTYPE::val.
static int yylex | ( | void * | , | |
void * | ||||
) | [static] |
int yyparse | ( | struct parser_params * | parser | ) |
Definition at line 4678 of file parse.c.
References ALLOC_N, arg_append, arg_blk_pass(), arg_concat, arg_var, aryset, assignable, attrset, block_append, block_dup_check, buf, call_bin_op, call_uni_op, CMDARG_PUSH, cmdarg_stack, command_start, compile_error, compile_for_eval, cond, COND_POP, COND_PUSH, cond_stack, cur_mid, deferred_nodes, dyna_in_block, dyna_pop, dyna_push, evstr2dstr, FIXNUM_P, fixpos(), fixup_nodes(), formal_argument, get_id, gettable, YYSTYPE::id, ID2SYM, ifndef_ripper, in_def, in_defined, in_single, INT2FIX, internal_id, is_asgn_or_id, is_local_id, keyword__ENCODING__, keyword__FILE__, keyword__LINE__, keyword_false, keyword_nil, keyword_self, keyword_true, lex_state, lex_strterm, list, list_append, list_concat, literal_concat, literal_concat0(), local_id, local_pop, local_push, logop, lpar_beg, match_op, nd_aid, nd_args, nd_body, nd_iter, nd_lit, nd_next, nd_plen, nd_set_line, nd_set_type, nd_type, nd_value, nd_vid, negate_lit(), NEW_ALIAS, new_args, NEW_ARGS_AUX, NEW_ARGSCAT, NEW_BEGIN, NEW_BLOCK_PASS, NEW_BREAK, new_bv, NEW_CALL, NEW_CASE, NEW_CDECL, NEW_CLASS, NEW_COLON2, NEW_COLON3, NEW_CVAR, NEW_DASGN_CURR, NEW_DEFINED, NEW_DEFN, NEW_DEFS, NEW_DOT2, NEW_DOT3, NEW_DSTR, NEW_DVAR, NEW_ENSURE, NEW_ERRINFO, new_evstr, NEW_EVSTR, NEW_FCALL, NEW_FOR, NEW_GVAR, NEW_HASH, NEW_IF, NEW_ITER, NEW_IVAR, NEW_LAMBDA, NEW_LIST, NEW_LIT, NEW_LVAR, NEW_MASGN, NEW_MODULE, NEW_NEXT, NEW_NIL, NEW_NODE, NEW_OP_ASGN1, NEW_OP_ASGN2, NEW_OP_ASGN_AND, NEW_OP_ASGN_OR, NEW_OPT_ARG, NEW_POSTARG, NEW_POSTEXE, NEW_REDO, NEW_RESBODY, NEW_RESCUE, NEW_RETRY, NEW_RETURN, NEW_SCLASS, NEW_SCOPE, NEW_SPLAT, NEW_STR, NEW_SUPER, NEW_UNDEF, NEW_UNLESS, NEW_UNTIL, NEW_VALIAS, NEW_WHEN, NEW_WHILE, NEW_XSTR, NEW_YIELD, new_yield, NEW_ZARRAY, NEW_ZSUPER, newline_node(), NIL_P, YYSTYPE::node, NODE_AND, NODE_ARRAY, node_assign, NODE_BEGIN, NODE_BLOCK, NODE_BLOCK_PASS, NODE_DASGN, NODE_DASGN_CURR, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_DXSTR, NODE_ENSURE, NODE_LASGN, NODE_LIT, NODE_MASGN, NODE_OR, NODE_RESCUE, NODE_SCOPE, NODE_STR, NODE_XSTR, NODE_YIELD, NODE_ZARRAY, NOEX_PRIVATE, YYSTYPE::num, one(), options(), PARSER_ARG, parser_yyerror(), Qfalse, Qnil, rb_backref_error, rb_cArray, rb_gc_force_recycle(), rb_intern, rb_intern2(), rb_intern_str(), rb_parse_in_main(), rb_str_resize(), rb_warn0, rb_warning0, RE_OPTION_ONCE, reduce_nodes, reg_compile, reg_fragment_check, reg_named_capture_assign, remove_begin(), ret_args, ruby_eval_tree, ruby_eval_tree_begin, ruby_sourceline, shadowing_lvar, splat_array(), STR_NEW0, T_REGEXP, tAREF, tASET, tCMP, tEQ, tEQQ, tGEQ, tLEQ, tLSHFT, tMATCH, tNEQ, tNMATCH, token_info_pop, token_info_push, tOROP, tPOW, tRSHFT, tUMINUS, tUPLUS, TYPE, YYSTYPE::val, value_expr, YYSTYPE::vars, void_expr, void_stmts, YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYID, YYLAST, YYMAXDEPTH, YYPACT_NINF, YYPOPSTACK, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_ALLOC_MAXIMUM, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yysyntax_error(), YYTABLE_NINF, YYTERROR, YYTRANSLATE, yyalloc::yyvs_alloc, and zero().
int yyparse | ( | ) |
struct symbols global_symbols [static] |
Referenced by Init_sym(), rb_gc_mark_symbols(), rb_id2str(), rb_intern3(), rb_sym_all_symbols(), and register_symid().
struct magic_comment magic_comments[] [static] |
{ {"coding", magic_comment_encoding, parser_encode_length}, {"encoding", magic_comment_encoding, parser_encode_length}, }
struct { ... } op_tbl[] [static] |
Referenced by rb_id2str(), and rb_intern3().
static const rb_data_type_t parser_data_type [static] |
struct st_hash_type symhash [static] |
const yytype_int16 yycheck[] [static] |
const yytype_uint16 yydefact[] [static] |
const yytype_int16 yydefgoto[] [static] |
{ -1, 1, 2, 64, 65, 66, 226, 529, 530, 241, 242, 413, 68, 335, 69, 70, 573, 706, 71, 72, 243, 73, 74, 75, 441, 76, 200, 353, 354, 184, 185, 186, 187, 574, 526, 189, 78, 415, 202, 247, 519, 661, 404, 405, 215, 216, 204, 391, 205, 480, 79, 333, 427, 592, 337, 786, 338, 787, 684, 910, 688, 685, 860, 556, 558, 698, 865, 234, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 665, 532, 673, 783, 784, 346, 724, 725, 726, 749, 642, 643, 750, 829, 830, 264, 265, 446, 621, 731, 297, 475, 91, 92, 382, 567, 566, 539, 909, 667, 777, 846, 850, 93, 94, 95, 96, 97, 98, 99, 276, 459, 100, 278, 272, 270, 274, 451, 634, 633, 741, 745, 101, 271, 102, 103, 207, 105, 208, 209, 551, 687, 696, 697, 623, 624, 625, 626, 627, 752, 753, 628, 629, 630, 631, 821, 733, 371, 557, 252, 210, 211, 108, 596, 521, 561, 286, 401, 402, 657, 431, 533, 341, 245 }
const yytype_int16 yypact[] [static] |
const yytype_int16 yypgoto[] [static] |
{ -778, -778, -778, 399, -778, 33, -778, -530, -33, -778, 159, -778, 23, -55, 21, -778, -462, -778, -15, 741, -136, -1, -66, -778, -403, -26, 1181, -306, 750, -52, -778, -20, -778, -778, 32, -778, 748, -778, 540, -778, 46, -98, -298, 54, 76, -778, -278, -196, -44, -283, 27, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 2, -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 298, -323, -512, -97, -610, -778, -755, -748, 120, -778, -485, -778, -636, -778, -49, -778, -778, -778, -778, -778, -778, -778, -778, -778, 752, -778, -778, -520, -778, -92, -778, -778, -778, -778, -778, -778, 753, -778, -778, -778, -778, -778, -778, -778, -778, 792, -778, -229, -778, -778, -778, -778, 7, -778, 13, -778, 1031, 762, 1198, 1109, -778, -778, -12, -416, -706, -549, -667, -121, -679, -777, 25, 128, -778, -579, -778, -434, 531, -778, -778, -778, -41, -287, 1927, -254, -778, -778, -32, -4, 88, -554, -217, 63, -31, -2 }
const yytype_uint16 yyr1[] [static] |
const yytype_uint8 yyr2[] [static] |
const yytype_uint16 yystos[] [static] |
const yytype_int16 yytable[] [static] |
const yytype_uint8 yytranslate[] [static] |