Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more
# File irb/slex.rb, line 65 def create(token, preproc = nil, postproc = nil) @head.create_subnode(token.split(//), preproc, postproc) end
# File irb/slex.rb, line 34 def def_rule(token, preproc = nil, postproc = nil, &block) D_DETAIL.pp token postproc = block if block_given? create(token, preproc, postproc) end
# File irb/slex.rb, line 41 def def_rules(*tokens, &block) if block_given? p = block end for token in tokens def_rule(token, nil, p) end end
# File irb/slex.rb, line 82 def inspect format("<SLex: @head = %s>", @head.inspect) end
# File irb/slex.rb, line 69 def match(token) case token when Array when String return match(token.split(//)) else return @head.match_io(token) end ret = @head.match(token) D_DETAIL.exec_if{D_DEATIL.printf "match end: %s:%s\n", ret, token.inspect} ret end
$BMW%A%‘%C%/(B?
# File irb/slex.rb, line 56 def postproc(token) node = search(token, proc) node.postproc=proc end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.