Server IP : 66.29.132.122 / Your IP : 18.226.150.246 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/ruby18/share/ri/1.8/system/RubyLex/BufferedReader/ |
Upload File : |
--- !ruby/object:RI::ClassDescription attributes: - !ruby/object:RI::Attribute comment: name: line_num rw: R class_methods: - !ruby/object:RI::MethodSummary name: new comment: - !ruby/struct:SM::Flow::P body: Read an input stream character by character. We allow for unlimited ungetting of characters just read. - !ruby/struct:SM::Flow::P body: We simplify the implementation greatly by reading the entire input into a buffer initially, and then simply traversing it using pointers. - !ruby/struct:SM::Flow::P body: "We also have to allow for the <em>here document diversion</em>. This little gem comes about when the lexer encounters a here document. At this point we effectively need to split the input stream into two parts: one to read the body of the here document, the other to read the rest of the input line where the here document was initially encountered. For example, we might have" - !ruby/struct:SM::Flow::VERB body: " do_something(<<-A, <<-B)\n stuff\n for\n A\n stuff\n for\n B\n" - !ruby/struct:SM::Flow::P body: When the lexer encounters the <<A, it reads until the end of the line, and keeps it around for later. It then reads the body of the here document. Once complete, it needs to read the rest of the original line, but then skip the here document body. constants: [] full_name: RubyLex::BufferedReader includes: [] instance_methods: - !ruby/object:RI::MethodSummary name: column - !ruby/object:RI::MethodSummary name: divert_read_from - !ruby/object:RI::MethodSummary name: get_read - !ruby/object:RI::MethodSummary name: getc - !ruby/object:RI::MethodSummary name: getc_already_read - !ruby/object:RI::MethodSummary name: peek - !ruby/object:RI::MethodSummary name: peek_equal - !ruby/object:RI::MethodSummary name: ungetc name: BufferedReader superclass: Object