parse_string() 應該就是處理 string 的parse_string() 在 parser_yylex() 內被呼叫,看 parser_yylex() 內一堆 switch case 的確是讀 char 來 match grammar rules 的 functionparser_yylex() 在 yylex() 內被呼叫yylex 在 yyparse 內被呼叫yyparse 在 yycompile0 內被呼叫yycompile0 在 yycompile 內被呼叫yycompile 被 parser_compile_string, rb_parser_compile_file_path, rb_parser_compile_generic 呼叫。到此出現多個選項,先用 parser_compile_string 看看parser_compile_string 一路經過 rb_parser_compile_string_path, rb_parser_compile_string, process_options, ruby_process_options, ruby_options
ruby_options 是在 rb_main() 中,所以先前的疑惑是錯的,main() 的確是 entry,裡面才會 parse ruby code 成 AST