Permalink
Browse files

import RDoc 3.5.3 and fix it for MacRuby.

  • Loading branch information...
1 parent f073ffa commit 31aca7b09884b163e3e710da9cf6849a38422038 @takaokouji takaokouji committed with Laurent Sansonetti Mar 29, 2011
Showing with 16,107 additions and 15,049 deletions.
  1. +14 −14 lib/{rdoc/lex → irb}/notifier.rb
  2. +6 −6 lib/{rdoc/lex → irb}/output-method.rb
  3. +23 −23 lib/{rdoc/lex → irb}/slex.rb
  4. +44 −301 lib/rdoc.rb
  5. +0 −232 lib/rdoc/README
  6. +113 −0 lib/rdoc/alias.rb
  7. +12 −0 lib/rdoc/anon_class.rb
  8. +202 −0 lib/rdoc/any_method.rb
  9. +108 −0 lib/rdoc/attr.rb
  10. +430 −0 lib/rdoc/class_module.rb
  11. +243 −0 lib/rdoc/code_object.rb
  12. +18 −1,056 lib/rdoc/code_objects.rb
  13. +86 −0 lib/rdoc/constant.rb
  14. +1,117 −0 lib/rdoc/context.rb
  15. +0 −340 lib/rdoc/diagram.rb
  16. +0 −249 lib/rdoc/dot.rb
  17. +89 −0 lib/rdoc/encoding.rb
  18. +37 −0 lib/rdoc/erbio.rb
  19. +35 −1,077 lib/rdoc/generator.rb
  20. +0 −113 lib/rdoc/generator/chm.rb
  21. +0 −100 lib/rdoc/generator/chm/chm.rb
  22. +390 −0 lib/rdoc/generator/darkfish.rb
  23. +0 −445 lib/rdoc/generator/html.rb
  24. +0 −24 lib/rdoc/generator/html/common.rb
  25. +0 −92 lib/rdoc/generator/html/frameless.rb
  26. +0 −150 lib/rdoc/generator/html/hefss.rb
  27. +0 −769 lib/rdoc/generator/html/html.rb
  28. +0 −151 lib/rdoc/generator/html/kilmer.rb
  29. +0 −427 lib/rdoc/generator/html/kilmerfactory.rb
  30. +0 −122 lib/rdoc/generator/html/one_page_html.rb
  31. +206 −0 lib/rdoc/generator/markup.rb
  32. +43 −184 lib/rdoc/generator/ri.rb
  33. 0 lib/rdoc/generator/template/darkfish/.document
  34. +319 −0 lib/rdoc/generator/template/darkfish/classpage.rhtml
  35. +124 −0 lib/rdoc/generator/template/darkfish/filepage.rhtml
  36. BIN lib/rdoc/generator/template/darkfish/images/brick.png
  37. BIN lib/rdoc/generator/template/darkfish/images/brick_link.png
  38. BIN lib/rdoc/generator/template/darkfish/images/bug.png
  39. BIN lib/rdoc/generator/template/darkfish/images/bullet_black.png
  40. BIN lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png
  41. BIN lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png
  42. BIN lib/rdoc/generator/template/darkfish/images/date.png
  43. BIN lib/rdoc/generator/template/darkfish/images/find.png
  44. BIN lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif
  45. BIN lib/rdoc/generator/template/darkfish/images/macFFBgHack.png
  46. BIN lib/rdoc/generator/template/darkfish/images/package.png
  47. BIN lib/rdoc/generator/template/darkfish/images/page_green.png
  48. BIN lib/rdoc/generator/template/darkfish/images/page_white_text.png
  49. BIN lib/rdoc/generator/template/darkfish/images/page_white_width.png
  50. BIN lib/rdoc/generator/template/darkfish/images/plugin.png
  51. BIN lib/rdoc/generator/template/darkfish/images/ruby.png
  52. BIN lib/rdoc/generator/template/darkfish/images/tag_green.png
  53. BIN lib/rdoc/generator/template/darkfish/images/wrench.png
  54. BIN lib/rdoc/generator/template/darkfish/images/wrench_orange.png
  55. BIN lib/rdoc/generator/template/darkfish/images/zoom.png
  56. +64 −0 lib/rdoc/generator/template/darkfish/index.rhtml
  57. +116 −0 lib/rdoc/generator/template/darkfish/js/darkfish.js
  58. +32 −0 lib/rdoc/generator/template/darkfish/js/jquery.js
  59. +114 −0 lib/rdoc/generator/template/darkfish/js/quicksearch.js
  60. +10 −0 lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js
  61. +759 −0 lib/rdoc/generator/template/darkfish/rdoc.css
  62. +0 −81 lib/rdoc/generator/texinfo.rb
  63. +0 −44 lib/rdoc/generator/texinfo/class.texinfo.erb
  64. +0 −6 lib/rdoc/generator/texinfo/file.texinfo.erb
  65. +0 −6 lib/rdoc/generator/texinfo/method.texinfo.erb
  66. +0 −28 lib/rdoc/generator/texinfo/texinfo.erb
  67. +0 −117 lib/rdoc/generator/xml.rb
  68. +0 −113 lib/rdoc/generator/xml/rdf.rb
  69. +0 −123 lib/rdoc/generator/xml/xml.rb
  70. +8 −0 lib/rdoc/ghost_method.rb
  71. +100 −0 lib/rdoc/include.rb
  72. +2 −0 lib/rdoc/known_classes.rb
  73. +0 −3 lib/rdoc/lex/README.txt
  74. +491 −276 lib/rdoc/markup.rb
  75. +119 −51 lib/rdoc/markup/attribute_manager.rb
  76. +27 −0 lib/rdoc/markup/blank_line.rb
  77. +78 −0 lib/rdoc/markup/document.rb
  78. +139 −0 lib/rdoc/markup/formatter.rb
  79. +689 −0 lib/rdoc/markup/formatter_test_case.rb
  80. +0 −337 lib/rdoc/markup/fragments.rb
  81. +20 −0 lib/rdoc/markup/heading.rb
  82. +44 −8 lib/rdoc/markup/inline.rb
  83. +0 −153 lib/rdoc/markup/lines.rb
  84. +81 −0 lib/rdoc/markup/list.rb
  85. +86 −0 lib/rdoc/markup/list_item.rb
  86. +14 −0 lib/rdoc/markup/paragraph.rb
  87. +483 −0 lib/rdoc/markup/parser.rb
  88. +151 −0 lib/rdoc/markup/pre_process.rb
  89. +0 −75 lib/rdoc/markup/preprocess.rb
  90. +69 −0 lib/rdoc/markup/raw.rb
  91. +20 −0 lib/rdoc/markup/rule.rb
  92. +116 −0 lib/rdoc/markup/text_formatter_test_case.rb
  93. +84 −0 lib/rdoc/markup/to_ansi.rb
  94. +80 −0 lib/rdoc/markup/to_bs.rb
  95. +0 −185 lib/rdoc/markup/to_flow.rb
  96. +186 −266 lib/rdoc/markup/to_html.rb
  97. +124 −69 lib/rdoc/markup/to_html_crossref.rb
  98. +0 −328 lib/rdoc/markup/to_latex.rb
  99. +292 −0 lib/rdoc/markup/to_rdoc.rb
  100. +38 −16 lib/rdoc/markup/to_test.rb
  101. +0 −69 lib/rdoc/markup/to_texinfo.rb
  102. +114 −0 lib/rdoc/markup/to_tt_only.rb
  103. +45 −0 lib/rdoc/markup/verbatim.rb
  104. +8 −0 lib/rdoc/meta_method.rb
  105. +353 −0 lib/rdoc/method_attr.rb
  106. +71 −0 lib/rdoc/normal_class.rb
  107. +66 −0 lib/rdoc/normal_module.rb
  108. +450 −320 lib/rdoc/options.rb
  109. +88 −30 lib/rdoc/parser.rb
  110. +600 −269 lib/rdoc/parser/c.rb
  111. +0 −1,835 lib/rdoc/parser/f95.rb
  112. +0 −165 lib/rdoc/parser/perl.rb
  113. +775 −1,819 lib/rdoc/parser/ruby.rb
  114. +160 −0 lib/rdoc/parser/ruby_tools.rb
  115. +22 −11 lib/rdoc/parser/simple.rb
  116. +409 −202 lib/rdoc/rdoc.rb
  117. +53 −0 lib/rdoc/require.rb
  118. +10 −0 lib/rdoc/ri.rb
  119. +0 −187 lib/rdoc/ri/cache.rb
  120. +0 −156 lib/rdoc/ri/descriptions.rb
  121. +0 −392 lib/rdoc/ri/display.rb
  122. +824 −387 lib/rdoc/ri/driver.rb
  123. +2 −613 lib/rdoc/ri/formatter.rb
  124. +82 −46 lib/rdoc/ri/paths.rb
  125. +0 −106 lib/rdoc/ri/reader.rb
  126. +265 −0 lib/rdoc/ri/store.rb
  127. +0 −79 lib/rdoc/ri/util.rb
  128. +0 −68 lib/rdoc/ri/writer.rb
  129. +1,293 −0 lib/rdoc/ruby_lex.rb
  130. +416 −0 lib/rdoc/ruby_token.rb
  131. +23 −0 lib/rdoc/single_class.rb
  132. +380 −57 lib/rdoc/stats.rb
  133. +51 −0 lib/rdoc/stats/normal.rb
  134. +59 −0 lib/rdoc/stats/quiet.rb
  135. +45 −0 lib/rdoc/stats/verbose.rb
  136. +327 −0 lib/rdoc/task.rb
  137. +0 −64 lib/rdoc/template.rb
  138. +314 −0 lib/rdoc/text.rb
  139. +28 −11 lib/rdoc/{tokenstream.rb → token_stream.rb}
  140. +439 −0 lib/rdoc/top_level.rb
  141. +6 −3 test_vm.rb
  142. +34 −0 vm.cpp
@@ -1,31 +1,31 @@
#
-# notifier.rb - output methods used by irb
-# $Release Version: 0.9.5$
-# $Revision: 16810 $
+# notifier.rb - output methods used by irb
+# $Release Version: 0.9.6$
+# $Revision$
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
-#
+#
#
require "e2mmap"
-require "rdoc/lex/output-method"
+require "irb/output-method"
module IRB
module Notifier
extend Exception2MessageMapper
- def_exception :ErrUndefinedNotifier,
+ def_exception :ErrUndefinedNotifier,
"undefined notifier level: %d is specified"
- def_exception :ErrUnrecognizedLevel,
+ def_exception :ErrUnrecognizedLevel,
"unrecognized notifier level: %s is specified"
def def_notifier(prefix = "", output_method = StdioOutputMethod.new)
CompositeNotifier.new(prefix, output_method)
end
module_function :def_notifier
-
- class AbstructNotifier
+
+ class AbstractNotifier
def initialize(prefix, base_notifier)
@prefix = prefix
@base_notifier = base_notifier
@@ -72,7 +72,7 @@ def exec_if
end
end
- class CompositeNotifier<AbstructNotifier
+ class CompositeNotifier<AbstractNotifier
def initialize(prefix, base_notifier)
super
@@ -93,7 +93,7 @@ def def_notifier(level, prefix = "")
def level_notifier=(value)
case value
- when AbstructNotifier
+ when AbstractNotifier
@level_notifier = value
when Integer
l = @notifiers[value]
@@ -107,12 +107,12 @@ def level_notifier=(value)
alias level= level_notifier=
end
- class LeveledNotifier<AbstructNotifier
+ class LeveledNotifier<AbstractNotifier
include Comparable
def initialize(base, level, prefix)
super(prefix, base)
-
+
@level = level
end
@@ -121,7 +121,7 @@ def initialize(base, level, prefix)
def <=>(other)
@level <=> other.level
end
-
+
def notify?
@base_notifier.level >= self
end
@@ -1,12 +1,12 @@
#
-# output-method.rb - optput methods used by irb
-# $Release Version: 0.9.5$
-# $Revision: 14912 $
+# output-method.rb - output methods used by irb
+# $Release Version: 0.9.6$
+# $Revision$
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
-#
+#
#
require "e2mmap"
@@ -16,7 +16,7 @@ module IRB
# StdioOutputMethod
class OutputMethod
- @RCS_ID='-$Id: output-method.rb 14912 2008-01-06 15:49:38Z akr $-'
+ @RCS_ID='-$Id$-'
def print(*opts)
IRB.fail NotImplementError, "print"
@@ -39,7 +39,7 @@ def printf(format, *opts)
# <minimum field width> (\*|\*[1-9][0-9]*\$|[1-9][0-9]*)
# <precision>.(\*|\*[1-9][0-9]*\$|[1-9][0-9]*|)?
# #<length modifier>(hh|h|l|ll|L|q|j|z|t)
- # <conversion specifier>[diouxXeEfgGcsb%]
+ # <conversion specifier>[diouxXeEfgGcsb%]
def parse_printf_format(format, opts)
return format, opts if $1.size % 2 == 1
end
@@ -1,20 +1,20 @@
#
# irb/slex.rb - simple lex analyzer
-# $Release Version: 0.9.5$
-# $Revision: 16810 $
+# $Release Version: 0.9.6$
+# $Revision$
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
-#
+#
#
require "e2mmap"
-require "rdoc/lex/notifier"
+require "irb/notifier"
module IRB
class SLex
- @RCS_ID='-$Id: slex.rb 16810 2008-06-04 09:37:38Z matz $-'
+ @RCS_ID='-$Id$-'
extend Exception2MessageMapper
def_exception :ErrNodeNothing, "node nothing"
@@ -24,20 +24,20 @@ class SLex
D_WARN = DOUT::def_notifier(1, "Warn: ")
D_DEBUG = DOUT::def_notifier(2, "Debug: ")
D_DETAIL = DOUT::def_notifier(4, "Detail: ")
-
+
DOUT.level = Notifier::D_NOMSG
def initialize
@head = Node.new("")
end
-
+
def def_rule(token, preproc = nil, postproc = nil, &block)
D_DETAIL.pp token
postproc = block if block_given?
- node = create(token, preproc, postproc)
+ create(token, preproc, postproc)
end
-
+
def def_rules(*tokens, &block)
if block_given?
p = block
@@ -46,26 +46,26 @@ def def_rules(*tokens, &block)
def_rule(token, nil, p)
end
end
-
+
def preproc(token, proc)
node = search(token)
node.preproc=proc
end
-
- #$BMW%A%'%C%/(B?
+
+ #$BMW%A%'%C%/(B?
def postproc(token)
node = search(token, proc)
node.postproc=proc
end
-
+
def search(token)
@head.search(token.split(//))
end
def create(token, preproc = nil, postproc = nil)
@head.create_subnode(token.split(//), preproc, postproc)
end
-
+
def match(token)
case token
when Array
@@ -78,14 +78,14 @@ def match(token)
D_DETAIL.exec_if{D_DEATIL.printf "match end: %s:%s\n", ret, token.inspect}
ret
end
-
+
def inspect
format("<SLex: @head = %s>", @head.inspect)
end
#----------------------------------------------------------------------
#
- # class Node -
+ # class Node -
#
#----------------------------------------------------------------------
class Node
@@ -99,7 +99,7 @@ def initialize(preproc = nil, postproc = nil)
attr_accessor :preproc
attr_accessor :postproc
-
+
def search(chrs, opt = nil)
return self if chrs.empty?
ch = chrs.shift
@@ -114,7 +114,7 @@ def search(chrs, opt = nil)
end
end
end
-
+
def create_subnode(chrs, preproc = nil, postproc = nil)
if chrs.empty?
if @postproc
@@ -127,7 +127,7 @@ def create_subnode(chrs, preproc = nil, postproc = nil)
end
return self
end
-
+
ch = chrs.shift
if node = @Tree[ch]
if chrs.empty?
@@ -161,7 +161,7 @@ def create_subnode(chrs, preproc = nil, postproc = nil)
# chrs: String
# character array
# io must have getc()/ungetc(); and ungetc() must be
- # able to be called arbitrary number of times.
+ # able to be called arbitrary number of times.
#
def match(chrs, op = "")
D_DETAIL.print "match>: ", chrs, "op:", op, "\n"
@@ -254,22 +254,22 @@ def match_io(io, op = "")
print "1: ", tr.inspect, "\n"
tr.def_rule("==") {print "==\n"}
print "2: ", tr.inspect, "\n"
-
+
print "case 1:\n"
print tr.match("="), "\n"
print "case 2:\n"
print tr.match("=="), "\n"
print "case 3:\n"
print tr.match("=>"), "\n"
-
+
when "2"
tr = SLex.new
print "0: ", tr.inspect, "\n"
tr.def_rule("=") {print "=\n"}
print "1: ", tr.inspect, "\n"
tr.def_rule("==", proc{false}) {print "==\n"}
print "2: ", tr.inspect, "\n"
-
+
print "case 1:\n"
print tr.match("="), "\n"
print "case 2:\n"
Oops, something went wrong.

0 comments on commit 31aca7b

Please sign in to comment.