⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Ripper
/
View File Name :
cdesc-Ripper.ri
U:RDoc::NormalClass[iI"Ripper:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[%o:RDoc::Markup::Paragraph;[I"$Ripper is a Ruby script parser.;To:RDoc::Markup::BlankLine o; ;[I"EYou can get information from the parser with event-based style. ;TI"QInformation such as abstract syntax trees or simple lexical analysis of the ;TI"Ruby program.;T@S:RDoc::Markup::Heading: leveli: textI" Usage;T@o; ;[I"PRipper provides an easy interface for parsing your program into a symbolic ;TI"'expression tree (or S-expression).;T@o; ;[I"JUnderstanding the output of the parser may come as a challenge, it's ;TI"@recommended you use PP to format the output for legibility.;T@o:RDoc::Markup::Verbatim;[I"require 'ripper' ;TI"require 'pp' ;TI" ;TI"@pp Ripper.sexp('def hello(world) "Hello, #{world}!"; end') ;TI" #=> [:program, ;TI" [[:def, ;TI"* [:@ident, "hello", [1, 4]], ;TI" [:paren, ;TI"X [:params, [[:@ident, "world", [1, 10]]], nil, nil, nil, nil, nil, nil]], ;TI" [:bodystmt, ;TI"" [[:string_literal, ;TI"# [:string_content, ;TI"; [:@tstring_content, "Hello, ", [1, 18]], ;TI"P [:string_embexpr, [[:var_ref, [:@ident, "world", [1, 27]]]]], ;TI"8 [:@tstring_content, "!", [1, 33]]]]], ;TI" nil, ;TI" nil, ;TI" nil]]]] ;T:@format0o; ;[I"MYou can see in the example above, the expression starts with +:program+.;T@o; ;[I"SFrom here, a method definition at +:def+, followed by the method's identifier ;TI"O
:@ident
. After the method's identifier comes the parentheses ;TI"8+:paren+ and the method parameters under +:params+.;T@o; ;[I"RNext is the method body, starting at +:bodystmt+ (+stmt+ meaning statement), ;TI"6which contains the full definition of the method.;T@o; ;[I"GIn our case, we're simply returning a String, so next we have the ;TI""+:string_literal+ expression.;T@o; ;[ I"SWithin our +:string_literal+ you'll notice two
@tstring_content
, ;TI"Sthis is the literal part for
Hello,
and
!
. Between ;TI"Nthe two
@tstring_content
statements is a +:string_embexpr+, ;TI"Swhere _embexpr_ is an embedded expression. Our expression consists of a local ;TI"Rvariable, or +var_ref+, with the identifier (
@ident
) of +world+.;T@S;;i; I"Resources;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"i{Ruby Inside}[http://www.rubyinside.com/using-ripper-to-see-how-ruby-is-parsing-your-code-5270.html];T@S;;i; I"Requirements;T@o;;;;[o;;0;[o; ;[I"%ruby 1.9 (support CVS HEAD only);To;;0;[o; ;[I"2bison 1.28 or later (Other yaccs do not work);T@S;;i; I"License;T@o; ;[I"Ruby License.;T@o;;;;[o;;0;[o; ;[I"Minero Aoki;To;;0;[o; ;[I"aamine@loveruby.net;To;;0;[o; ;[I"http://i.loveruby.net;T: @fileI"ext/ripper/lib/ripper.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ ;I""ext/ripper/lib/ripper/core.rb;T;0o;;[ ;I"$ext/ripper/lib/ripper/filter.rb;T;0o;;[ ;I"#ext/ripper/lib/ripper/lexer.rb;T;0o;;[ ;I""ext/ripper/lib/ripper/sexp.rb;T;0o;;[ ;I"parse.c;T;0o;;[ ;I"parse.y;T;0;0;0[ [ U:RDoc::Constant[i I"PARSER_EVENTS;TI"Ripper::PARSER_EVENTS;T:public0o;;[o; ;[I"/This array contains name of parser events.;T;@{;0@{@cRDoc::NormalClass0U;[i I"SCANNER_EVENTS;TI"Ripper::SCANNER_EVENTS;T;0o;;[o; ;[I"0This array contains name of scanner events.;T;@{;0@{@@‘0U;[i I"EVENTS;TI"Ripper::EVENTS;T;0o;;[o; ;[I"3This array contains name of all ripper events.;T;@{;0@{@@‘0U;[i I"Version;TI"Ripper::Version;T;0o;;[o; ;[I"version of Ripper;T@;@‚;0@‚@@‘0[ [[I" class;T[[;[[I"dedent_string;TI"parse.c;T[I"lex;TI"#ext/ripper/lib/ripper/lexer.rb;T[I"lex_state_name;T@¶[I"new;T@¶[I" parse;TI""ext/ripper/lib/ripper/core.rb;T[I" sexp;TI""ext/ripper/lib/ripper/sexp.rb;T[I" sexp_raw;T@Ã[I" slice;T@¹[I" tokenize;T@¹[:protected[ [:private[ [I" instance;T[[;[[I"column;T@¶[I"debug_output;T@¶[I"debug_output=;T@¶[I" encoding;T@¶[I"end_seen?;T@¶[I"error?;T@¶[I" filename;T@¶[I"lineno;T@¶[I" parse;T@¶[I" state;T@¶[I" token;T@¶[I"yydebug;T@¶[I" yydebug=;T@¶[;[ [;[ [I"compile_error;T@À[I"dedent_string;T@¶[I" warn;T@À[I"warning;T@À[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@x@{@~@|@I"lib/irb/color.rb;TI"lib/irb/ruby-lex.rb;TI"(lib/rdoc/parser/ripper_state_lex.rb;T@‚@…@…cRDoc::TopLevel