bixbite 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. data/LICENSE +20 -0
  2. data/README.markdown +49 -0
  3. data/VERSION +1 -0
  4. data/bin/bixbite +73 -0
  5. data/lib/bixbite.rb +13 -0
  6. data/lib/bixbite/command.rb +14 -0
  7. data/lib/bixbite/create.rb +76 -0
  8. data/template/Rakefile +25 -0
  9. data/template/assets/bixbite/Rakefile.rb +297 -0
  10. data/template/assets/naturaldocs/NaturalDocs/Config/Languages.txt +286 -0
  11. data/template/assets/naturaldocs/NaturalDocs/Config/Topics.txt +382 -0
  12. data/template/assets/naturaldocs/NaturalDocs/Help/customizinglanguages.html +52 -0
  13. data/template/assets/naturaldocs/NaturalDocs/Help/customizingtopics.html +74 -0
  14. data/template/assets/naturaldocs/NaturalDocs/Help/documenting.html +58 -0
  15. data/template/assets/naturaldocs/NaturalDocs/Help/documenting/reference.html +146 -0
  16. data/template/assets/naturaldocs/NaturalDocs/Help/documenting/walkthrough.html +180 -0
  17. data/template/assets/naturaldocs/NaturalDocs/Help/example/Default.css +528 -0
  18. data/template/assets/naturaldocs/NaturalDocs/Help/example/NaturalDocs.js +204 -0
  19. data/template/assets/naturaldocs/NaturalDocs/Help/examples.css +90 -0
  20. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/background.png +0 -0
  21. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/leftside.png +0 -0
  22. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/logo.png +0 -0
  23. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/overbody.png +0 -0
  24. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/overbodybg.png +0 -0
  25. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/overleftmargin.png +0 -0
  26. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/overmenu.png +0 -0
  27. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/overmenubg.png +0 -0
  28. data/template/assets/naturaldocs/NaturalDocs/Help/images/header/rightside.png +0 -0
  29. data/template/assets/naturaldocs/NaturalDocs/Help/images/logo.gif +0 -0
  30. data/template/assets/naturaldocs/NaturalDocs/Help/images/menu/about.png +0 -0
  31. data/template/assets/naturaldocs/NaturalDocs/Help/images/menu/background.png +0 -0
  32. data/template/assets/naturaldocs/NaturalDocs/Help/images/menu/bottomleft.png +0 -0
  33. data/template/assets/naturaldocs/NaturalDocs/Help/images/menu/bottomright.png +0 -0
  34. data/template/assets/naturaldocs/NaturalDocs/Help/images/menu/community.png +0 -0
  35. data/template/assets/naturaldocs/NaturalDocs/Help/images/menu/customizing.png +0 -0
  36. data/template/assets/naturaldocs/NaturalDocs/Help/images/menu/using.png +0 -0
  37. data/template/assets/naturaldocs/NaturalDocs/Help/index.html +9 -0
  38. data/template/assets/naturaldocs/NaturalDocs/Help/javascript/BrowserStyles.js +77 -0
  39. data/template/assets/naturaldocs/NaturalDocs/Help/javascript/PNGHandling.js +72 -0
  40. data/template/assets/naturaldocs/NaturalDocs/Help/keywords.html +38 -0
  41. data/template/assets/naturaldocs/NaturalDocs/Help/languages.html +32 -0
  42. data/template/assets/naturaldocs/NaturalDocs/Help/menu.html +79 -0
  43. data/template/assets/naturaldocs/NaturalDocs/Help/output.html +84 -0
  44. data/template/assets/naturaldocs/NaturalDocs/Help/running.html +40 -0
  45. data/template/assets/naturaldocs/NaturalDocs/Help/styles.css +290 -0
  46. data/template/assets/naturaldocs/NaturalDocs/Help/styles.html +52 -0
  47. data/template/assets/naturaldocs/NaturalDocs/Help/troubleshooting.html +18 -0
  48. data/template/assets/naturaldocs/NaturalDocs/Info/CSSGuide.txt +947 -0
  49. data/template/assets/naturaldocs/NaturalDocs/Info/File Parsing.txt +83 -0
  50. data/template/assets/naturaldocs/NaturalDocs/Info/HTMLTestCases.pm +269 -0
  51. data/template/assets/naturaldocs/NaturalDocs/Info/Languages.txt +107 -0
  52. data/template/assets/naturaldocs/NaturalDocs/Info/NDMarkup.txt +91 -0
  53. data/template/assets/naturaldocs/NaturalDocs/Info/Symbol Management.txt +59 -0
  54. data/template/assets/naturaldocs/NaturalDocs/Info/images/Logo.png +0 -0
  55. data/template/assets/naturaldocs/NaturalDocs/JavaScript/NaturalDocs.js +836 -0
  56. data/template/assets/naturaldocs/NaturalDocs/License-GPL.txt +341 -0
  57. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/BinaryFile.pm +294 -0
  58. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Builder.pm +280 -0
  59. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Builder/Base.pm +348 -0
  60. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Builder/FramedHTML.pm +345 -0
  61. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Builder/HTML.pm +398 -0
  62. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Builder/HTMLBase.pm +3693 -0
  63. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/ClassHierarchy.pm +860 -0
  64. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/ClassHierarchy/Class.pm +412 -0
  65. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/ClassHierarchy/File.pm +157 -0
  66. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/ConfigFile.pm +497 -0
  67. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Constants.pm +165 -0
  68. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/DefineMembers.pm +100 -0
  69. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Error.pm +305 -0
  70. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/File.pm +540 -0
  71. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/ImageReferenceTable.pm +383 -0
  72. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/ImageReferenceTable/Reference.pm +44 -0
  73. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/ImageReferenceTable/String.pm +110 -0
  74. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages.pm +1475 -0
  75. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/ActionScript.pm +1473 -0
  76. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Ada.pm +38 -0
  77. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Advanced.pm +828 -0
  78. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Advanced/Scope.pm +95 -0
  79. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Advanced/ScopeChange.pm +70 -0
  80. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Base.pm +832 -0
  81. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/CSharp.pm +1484 -0
  82. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/PLSQL.pm +319 -0
  83. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Pascal.pm +143 -0
  84. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Perl.pm +1370 -0
  85. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Prototype.pm +92 -0
  86. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Prototype/Parameter.pm +87 -0
  87. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Simple.pm +503 -0
  88. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Languages/Tcl.pm +219 -0
  89. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Menu.pm +3406 -0
  90. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Menu/Entry.pm +201 -0
  91. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/NDMarkup.pm +76 -0
  92. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Parser.pm +1331 -0
  93. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Parser/JavaDoc.pm +464 -0
  94. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Parser/Native.pm +1060 -0
  95. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Parser/ParsedTopic.pm +253 -0
  96. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Project.pm +1402 -0
  97. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Project/ImageFile.pm +160 -0
  98. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Project/SourceFile.pm +113 -0
  99. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/ReferenceString.pm +334 -0
  100. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Settings.pm +1418 -0
  101. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Settings/BuildTarget.pm +66 -0
  102. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SourceDB.pm +678 -0
  103. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SourceDB/Extension.pm +84 -0
  104. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SourceDB/File.pm +129 -0
  105. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SourceDB/Item.pm +201 -0
  106. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SourceDB/ItemDefinition.pm +45 -0
  107. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SourceDB/WatchedFileDefinitions.pm +159 -0
  108. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/StatusMessage.pm +102 -0
  109. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SymbolString.pm +212 -0
  110. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SymbolTable.pm +1984 -0
  111. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SymbolTable/File.pm +186 -0
  112. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SymbolTable/IndexElement.pm +522 -0
  113. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SymbolTable/Reference.pm +273 -0
  114. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SymbolTable/ReferenceTarget.pm +97 -0
  115. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SymbolTable/Symbol.pm +428 -0
  116. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/SymbolTable/SymbolDefinition.pm +96 -0
  117. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Topics.pm +1319 -0
  118. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Topics/Type.pm +151 -0
  119. data/template/assets/naturaldocs/NaturalDocs/Modules/NaturalDocs/Version.pm +384 -0
  120. data/template/assets/naturaldocs/NaturalDocs/NaturalDocs +400 -0
  121. data/template/assets/naturaldocs/NaturalDocs/NaturalDocs.bat +17 -0
  122. data/template/assets/naturaldocs/NaturalDocs/Styles/Default.css +767 -0
  123. data/template/assets/naturaldocs/NaturalDocs/Styles/Roman.css +765 -0
  124. data/template/assets/naturaldocs/NaturalDocs/Styles/Small.css +763 -0
  125. data/template/assets/utilities/pngout +0 -0
  126. data/template/deploy/public_html/.htaccess +0 -0
  127. data/template/documentation/js/.htaccess +0 -0
  128. data/template/src/html/.htaccess +76 -0
  129. data/template/src/html/css/cmn/global.css +96 -0
  130. data/template/src/html/css/cmn/ie.css +15 -0
  131. data/template/src/html/css/cmn/ie6.css +15 -0
  132. data/template/src/html/images/cmn/.htaccess +0 -0
  133. data/template/src/html/images/tmp/.htaccess +0 -0
  134. data/template/src/html/includes/debug.inc +5 -0
  135. data/template/src/html/includes/footer.inc +52 -0
  136. data/template/src/html/includes/header.inc +61 -0
  137. data/template/src/html/includes/html.inc +3 -0
  138. data/template/src/html/includes/namespace.inc +19 -0
  139. data/template/src/html/includes/page.inc +151 -0
  140. data/template/src/html/index.html +35 -0
  141. data/template/src/html/js/cmn/bootstrap.js +74 -0
  142. data/template/src/html/js/cmn/global.js +142 -0
  143. data/template/src/html/js/cmn/lib/LAB.js +348 -0
  144. data/template/src/html/min/.htaccess +4 -0
  145. data/template/src/html/min/MinifyCLI.php +19 -0
  146. data/template/src/html/min/README.txt +132 -0
  147. data/template/src/html/min/builder/_index.js +242 -0
  148. data/template/src/html/min/builder/bm.js +36 -0
  149. data/template/src/html/min/builder/index.php +182 -0
  150. data/template/src/html/min/builder/ocCheck.php +36 -0
  151. data/template/src/html/min/builder/rewriteTest.js +1 -0
  152. data/template/src/html/min/config.php +187 -0
  153. data/template/src/html/min/groupsConfig.php +34 -0
  154. data/template/src/html/min/index.php +66 -0
  155. data/template/src/html/min/lib/FirePHP.php +1370 -0
  156. data/template/src/html/min/lib/HTTP/ConditionalGet.php +348 -0
  157. data/template/src/html/min/lib/HTTP/Encoder.php +326 -0
  158. data/template/src/html/min/lib/JSMin.php +314 -0
  159. data/template/src/html/min/lib/JSMinPlus.php +1872 -0
  160. data/template/src/html/min/lib/Minify.php +532 -0
  161. data/template/src/html/min/lib/Minify/Build.php +103 -0
  162. data/template/src/html/min/lib/Minify/CSS.php +83 -0
  163. data/template/src/html/min/lib/Minify/CSS/Compressor.php +250 -0
  164. data/template/src/html/min/lib/Minify/CSS/UriRewriter.php +270 -0
  165. data/template/src/html/min/lib/Minify/Cache/APC.php +130 -0
  166. data/template/src/html/min/lib/Minify/Cache/File.php +125 -0
  167. data/template/src/html/min/lib/Minify/Cache/Memcache.php +137 -0
  168. data/template/src/html/min/lib/Minify/ClosureCompiler.php +85 -0
  169. data/template/src/html/min/lib/Minify/CommentPreserver.php +90 -0
  170. data/template/src/html/min/lib/Minify/Controller/Base.php +202 -0
  171. data/template/src/html/min/lib/Minify/Controller/Files.php +78 -0
  172. data/template/src/html/min/lib/Minify/Controller/Groups.php +94 -0
  173. data/template/src/html/min/lib/Minify/Controller/MinApp.php +132 -0
  174. data/template/src/html/min/lib/Minify/Controller/Page.php +82 -0
  175. data/template/src/html/min/lib/Minify/Controller/Version1.php +118 -0
  176. data/template/src/html/min/lib/Minify/HTML.php +245 -0
  177. data/template/src/html/min/lib/Minify/ImportProcessor.php +157 -0
  178. data/template/src/html/min/lib/Minify/Lines.php +131 -0
  179. data/template/src/html/min/lib/Minify/Logger.php +45 -0
  180. data/template/src/html/min/lib/Minify/Packer.php +37 -0
  181. data/template/src/html/min/lib/Minify/Source.php +187 -0
  182. data/template/src/html/min/lib/Minify/YUICompressor.php +139 -0
  183. data/template/src/html/min/lib/Solar/Dir.php +199 -0
  184. data/template/src/html/min/lib/closure-compiler.jar +0 -0
  185. data/template/src/html/min/lib/yuicompressor-2.4.2.jar +0 -0
  186. data/template/src/html/min/utils.php +90 -0
  187. data/template/src/templates/css/template.css +7 -0
  188. data/template/src/templates/js/template.js +72 -0
  189. data/template/src/templates/template.html +18 -0
  190. data/template/src/yaml/config.yml +46 -0
  191. data/template/src/yaml/deploy.yml +35 -0
  192. data/test/bixbite_test.rb +7 -0
  193. data/test/test_helper.rb +10 -0
  194. metadata +278 -0
@@ -0,0 +1,83 @@
1
+
2
+ Architecture: File Parsing
3
+
4
+ ####################################################################################
5
+
6
+ This is the architecture and code path for general file parsing. We pick it up at <NaturalDocs::Parser->Parse()> because we're not interested in how the files are gathered and their languages determined for the purposes of this document. We are just interested in the process each individual file goes through when it's decided that it should be parsed.
7
+
8
+
9
+
10
+ Stage: Preparation and Differentiation
11
+ _______________________________________________________________________________________________________
12
+
13
+ <NaturalDocs::Parser->Parse()> can be called from one of two places, <NaturalDocs::Parser->ParseForInformation()> and <NaturalDocs::Parser->ParseForBuild()>, which correspond to the parsing and building phases of Natural Docs. There is no noteworthy work done in either of them before they call Parse().
14
+
15
+
16
+ Stage: Basic File Processing
17
+ _______________________________________________________________________________________________________
18
+
19
+ The nitty-gritty file handling is no longer done in <NaturalDocs::Parser> itself due to the introduction of full language support in 1.3, as it required two completely different code paths for full and basic language support. Instead it's handled in NaturalDocs::Languages::Base->ParseFile(), which is really a virtual function that leads to <NaturalDocs::Languages::Simple->ParseFile()> for basic language support or a version appearing in a package derived from <NaturalDocs::Languages::Advanced> for full language support.
20
+
21
+ The mechinations of how these functions work is for another document, but their responsibility is to feed all comments Natural Docs should be interested in back to the parser via <NaturalDocs::Parser->OnComment()>.
22
+
23
+
24
+ Stage: Comment Processing
25
+ _______________________________________________________________________________________________________
26
+
27
+ <NaturalDocs::Parser->OnComment()> receives the comment sans comment symbols, since that's language specific. All comment symbols are replaced by spaces in the text instead of removed so any indentation is properly preserved. Also passed is whether it's a JavaDoc styled comment, as that varies by language as well.
28
+
29
+ OnComment() runs what it receives through <NaturalDocs::Parser->CleanComment()> which normalizes the text by removing comment boxes and horizontal lines, expanding tabs, etc.
30
+
31
+
32
+ Stage: Comment Type Determination
33
+ _______________________________________________________________________________________________________
34
+
35
+ OnComment() sends the comment to <NaturalDocs::Parser::Native->IsMine()> to test if it's definitely Natural Docs content, such as by starting with a recognized header line. If so, it sends it to <NaturalDocs::Parser::Native->ParseComment()>.
36
+
37
+ If not, OnComment() sends the comment to <NaturalDocs::Parser::JavaDoc->IsMine()> to test if it's definitely JavaDoc content, such as by having JavaDoc tags. If so, it sends it to <NaturalDocs::Parser::JavaDoc->ParseComment()>.
38
+
39
+ If not, the content is ambiguous. If it's a JavaDoc-styled comment it goes to <NaturalDocs::Parser::Native->ParseComment()> to be treated as a headerless Natural Docs comment. It is ignored otherwise, which lets normal comments slip through. Note that it's only ambiguous if neither parser claims it; there's no test to see if they both do. Instead Natural Docs always wins.
40
+
41
+ We will not go into the JavaDoc code path for the purposes of this document. It simply converts the JavaDoc comment into <NDMarkup> as best it can, which will never be perfectly, and adds a <NaturalDocs::Parser::ParsedTopic> to the list for that file. Each of those ParsedTopics will be headerless as indicated by having an undefined <NaturalDocs::Parser::ParsedTopic->Title()>.
42
+
43
+
44
+ Stage: Native Comment Parsing
45
+ _______________________________________________________________________________________________________
46
+
47
+ At this point, parsing is handed off to <NaturalDocs::Parser::Native->ParseComment()>. It searches for header lines within the comment and divides the content into individual topics. It also detects (start code) and (end) sections so that anything that would normally be interpreted as a header line can appear there without breaking the topic.
48
+
49
+ The content between the header lines is sent to <NaturalDocs::Parser::Native->FormatBody()> which handles all the block level formatting such as paragraphs, bullet lists, and code sections. That function in turn calls <NaturalDocs::Parser::Native->RichFormatTextBlock()> on certain snippets of the text to handle all inline formatting, such as bold, underline, and links, both explicit and automatic.
50
+
51
+ <NaturalDocs::Parser::Native->ParseComment()> then has the body in <NDMarkup> so it makes a <NaturalDocs::Parser::ParsedTopic> to add to the list. It keeps track of the scoping via topic scoping, regardless of whether we're using full or basic language support. Headerless topics are given normal scope regardless of whether they might be classes or other scoped types.
52
+
53
+
54
+ Group: Post Processing
55
+ _______________________________________________________________________________________________________
56
+
57
+ After all the comments have been parsed into ParsedTopics and execution has been returned to <NaturalDocs::Parser->Parse()>, it's time for some after the fact cleanup. Some things are done like breaking topic lists, determining the menu title, and adding automatic group headings that we won't get into here. There are two processes that are very relevant though.
58
+
59
+
60
+ Stage: Repairing Packages
61
+ _______________________________________________________________________________________________________
62
+
63
+ If the file we parsed had full language support, the <NaturalDocs::Languages::Advanced> parser would have done more than just generate various OnComment() calls. It would also return a scope record, as represented by <NaturalDocs::Languages::Advanced::ScopeChange> objects, and a second set of ParsedTopics it extracted purely from the code, which we'll refer to as autotopics. The scope record shows, purely from the source, what scope each line of code appears in. This is then combined with the topic scoping to update ParsedTopics that come from the comments in the function <NaturalDocs::Parser->RepairPackages()>.
64
+
65
+ If a comment topic changes the scope, that's honored until the next autotopic or scope change from the code. This allows someone to document a class that doesn't appear in the code purely with topic scoping without throwing off anything else. Any other comment topics have their scope changed to the current scope no matter how it's arrived at. This allows someone to manually document a function without manually documenting the class and still have it appear under that class. The scope record will change the scope to part of that class even if topic scoping did not. Essentially the previous topic scoping is thrown out, which I guess is something that can be improved.
66
+
67
+ None of this affects the autotopics, as they are known to have the correct scoping since they are gleaned from the code with a dedicated parser. Wouldn't there be duplication of manually documented code elements, which would appear both in the autotopics and in the comment topics? Yes. That brings us to our next stage, which is...
68
+
69
+
70
+ Stage: Merging Auto Topics
71
+ _______________________________________________________________________________________________________
72
+
73
+ As mentioned above, ParseFile() also returns a set of ParsedTopics gleaned from the code called autotopics. The function <NaturalDocs::Parser->MergeAutoTopics()> merges this list with the comment topics.
74
+
75
+ The list is basically merged by line number. Since named topics should appear directly above the thing that they're documenting, topics are tested that way and combined into one if they match. The description and title of the comment topic is merged with the prototype of the autotopic. JavaDoc styled comments are also merged in this function, as they should appear directly above the code element they're documenting. Any headerless topics that don't, either by appearing past the last autotopic or above another comment topic, are discarded.
76
+
77
+
78
+ Stage: Conclusion
79
+ _______________________________________________________________________________________________________
80
+
81
+ Thus ends all processing by <NaturalDocs::Parser->Parse()>. The file is now a single list of <NaturalDocs::Parser::ParsedTopics> with all the body content in <NDMarkup>. If we were using <NaturalDocs::Parser->ParseForBuild()>, that's pretty much it and it's ready to be converted into the output format. If we were using <NaturalDocs::Parser->ParseForInformation()> though, the resulting file is scanned for all relevant information to feed into other packages such as <NaturalDocs::SymbolTable>.
82
+
83
+ Note that no prototype processing was done in this process, only the possible tranferring of prototypes from one ParsedTopic to another when merging autotopics with comment topics. Obtaining prototypes and formatting them is handled by <NaturalDocs::Languages::Simple> and <NaturalDocs::Languages::Advanced> derived packages.
@@ -0,0 +1,269 @@
1
+ ###############################################################################
2
+ #
3
+ # File: Browser Testing
4
+ #
5
+ ###############################################################################
6
+ #
7
+ # This file tests Natural Docs' generated output. Particularly useful when testing various browsers.
8
+ #
9
+ ###############################################################################
10
+
11
+ # This file is part of Natural Docs, which is Copyright (C) 2003-2008 Greg Valure
12
+ # Natural Docs is licensed under the GPL
13
+
14
+ use strict;
15
+ use integer;
16
+
17
+
18
+ #
19
+ # About: Browsers
20
+ #
21
+ # The specific browser versions tested are below. Everything is tested on Windows Vista unless otherwise noted.
22
+ #
23
+ # Firefox 2.0.0.10 - 2.0 released October 2006.
24
+ # Firefox 1.5.0.8 - 1.5 released Novemer 2005.
25
+ # Firefox 1.0.8 - 1.0 released November 2004. Not critical to support.
26
+ #
27
+ # IE 7.0 - 7.0 released October 2006.
28
+ # IE 6.0 - 6.0 released August 2001. Tested on Windows XP SP2 via Virtual PC.
29
+ #
30
+ # Safari 3.0.4 - 3.0 released June 2007. Tested Windows version.
31
+ # Safari 2.0.4 - 2.0 released April 2005. Tested on Mac OS X 10.4 Tiger.
32
+ #
33
+ # Opera 9.02 - 9.0 released June 2006.
34
+ # Opera 8.54 - 8.5 released September 2005.
35
+ # Opera 8.02 - 8.0 released April 2005.
36
+ # Opera 7.51 - 7.5 released around August 2004 I think. Not critical to support.
37
+ # Opera 7.02 - 7.0 released January 2003. Not critical to support.
38
+ #
39
+ # Konqueror 3.5.5 - Tested on openSUSE 10.2 via VMware Player.
40
+ #
41
+
42
+
43
+ ###############################################################################
44
+ # Group: Search
45
+
46
+ #
47
+ # Topic: Unframed HTML Search
48
+ #
49
+ # Tests:
50
+ #
51
+ # - Make sure the search box appears and disappears correctly on hover.
52
+ # - Type to bring up results. Type further to narrow them. Narrow until there's no results.
53
+ # - Backspace to bring the results back. Backspacing to empty closes the results.
54
+ # - Type to bring up results with a different first letter. (Tests iframe content switch.)
55
+ # - Type *Z* to bring up empty page when there's nothing with that first letter. (Tests generic no results page.)
56
+ # - Type *Name* in Everything search to test expanding and collapsing, especially between two that differ only by case.
57
+ # - Change filter to *Functions* to test changing filter while results are open. Change to *Types* to switch to one with
58
+ # no results.
59
+ # - Test Close button on results. Should deactivate panel as well.
60
+ # - Clicking away should deactivate panel if the box is empty, not have an effect if there are results open.
61
+ # - Text should always change back to "Search" when deactivating.
62
+ #
63
+ # Results:
64
+ #
65
+ # Firefox 2.0 - OK
66
+ # Firefox 1.5 - OK
67
+ # Firefox 1.0 - OK
68
+ #
69
+ # IE 7.0 - OK
70
+ # IE 6.0 - Functionally OK. Search panel doesn't activate on hover. Works fine when clicked.
71
+ #
72
+ # Safari 3.0 - OK
73
+ # Safari 2.0 - *Broken.* Results panel doesn't show up. Border around deactivated search box.
74
+ #
75
+ # Opera 9.0 - OK
76
+ # Opera 8.5 - OK
77
+ # Opera 8.0 - OK
78
+ # Opera 7.5 - Functionally OK. Search panel has sunken border when deactivated, minor pixel shifting.
79
+ # Opera 7.0 - *Broken.* Completely.
80
+ #
81
+ # Konqueror 3.5 - *Broken.* Results panel doesn't show up. Seems to fail on "resultsFrame = window.frames.MSearchResults;"
82
+ #
83
+
84
+ #
85
+ # Topic: Framed HTML Search
86
+ #
87
+ # Tests:
88
+ #
89
+ # - Make sure the search box appears and disappears correctly on hover.
90
+ # - Type to bring up results on right. Type further to narrow them. Narrow until there's no results.
91
+ # - Backspace to bring the results back.
92
+ # - Type to bring up results with a different first letter. (Tests frame content switch.)
93
+ # - Type *Z* to bring up empty page when there's nothing with that first letter. (Tests generic no results page.)
94
+ # - Type *Name* in Everything search to see that there's no collapsing in this mode.
95
+ # - Change filter to *Functions* to test changing filter while results are open. Change to *Types* to switch to one with
96
+ # no results.
97
+ # - Clicking away should deactivate panel.
98
+ # - Clicking a result should deactivate panel and show up in correct frame.
99
+ # - Text should always change back to "Search" when deactivating.
100
+ #
101
+ # Results:
102
+ #
103
+ # Firefox 2.0 - OK
104
+ # Firefox 1.5 - OK
105
+ # Firefox 1.0 - OK
106
+ #
107
+ # IE 7.0 - OK
108
+ # IE 6.0 - Functionally OK. Search panel doesn't activate on hover, is a little wide. Works fine when clicked.
109
+ #
110
+ # Safari 3.0 - OK
111
+ # Safari 2.0 - Functionally OK. Has a sunken border around the deactivated seach field.
112
+ #
113
+ # Opera 9.0 - OK
114
+ # Opera 8.5 - OK
115
+ # Opera 8.0 - OK
116
+ # Opera 7.5 - Functionally OK. Search panel has sunken border when deactivated, minor pixel shifting.
117
+ # Opera 7.0 - *Broken.*
118
+ #
119
+ # Konqueror 3.5 - Functionally OK. Panel doesn't reset and deactivate when clicking a result link.
120
+ #
121
+
122
+
123
+ ###############################################################################
124
+ # Group: Other
125
+
126
+ #
127
+ # Topic: Images
128
+ #
129
+ # Tests:
130
+ #
131
+ # - Here is an embedded image on its own line.
132
+ #
133
+ # (see images/logo.png)
134
+ #
135
+ # - Here is a reference in the middle of a sentence, in the middle of a bullet list: (see images/logo.png) It should have been
136
+ # converted to a link with the image appearing below the bullet list and the file name used as a caption. Make sure the
137
+ # caption positions correctly.
138
+ # - Here's a link to a non-existent image, which should appear literally: (see images/doesntexist.jpg)
139
+ # - Here is an embedded image that doesn't exist on it's own line.
140
+ #
141
+ # (see images/doesntexist.png)
142
+ #
143
+ # - Here is a link using the "(see)" syntax which shouldn't be interpreted as an image link because it doesn't end with an
144
+ # acceptable extension. Also, links should still resolve because of that. (see <Framed HTML Search>)
145
+ #
146
+ # Results:
147
+ #
148
+ # Firefox 2.0 - OK
149
+ # Firefox 1.5 - OK
150
+ # Firefox 1.0 - OK
151
+ #
152
+ # IE 7.0 - OK
153
+ # IE 6.0 - OK
154
+ #
155
+ # Safari 3.0 - OK
156
+ # Safari 2.0 - OK
157
+ #
158
+ # Opera 9.0 - OK
159
+ # Opera 8.5 - OK
160
+ # Opera 8.0 - OK
161
+ # Opera 7.5 - OK
162
+ # Opera 7.0 - OK
163
+ #
164
+ # Konqueror 3.5 - OK
165
+
166
+
167
+ #
168
+ # Topic: Prototypes and Tooltips
169
+ #
170
+ # Hover over <NaturalDocs::Parser::JavaDoc->ParseComment()> and <NaturalDocs::Parser::JavaDoc->IsMine()>
171
+ #
172
+ # Tests:
173
+ #
174
+ # - A tooltip should appear about a second after you hover over the link above.
175
+ # - It should go away when you move the cursor away.
176
+ # - It shoud be positioned directly underneath with a slight gap.
177
+ # - The prototype should be formatted cleanly with each parameter on its own line and aligned in columns.
178
+ # - The asterisk should be in a separate column.
179
+ # - Test it with the link too close to the edge of the window so the pop-up has to shift left to fit.
180
+ #
181
+ # Results:
182
+ #
183
+ # Firefox 2.0 - OK
184
+ # Firefox 1.5 - OK
185
+ # Firefox 1.0 - OK
186
+ #
187
+ # IE 7.0 - OK
188
+ # IE 6.0 - OK
189
+ #
190
+ # Safari 3.0 - OK
191
+ # Safari 2.0 - OK
192
+ #
193
+ # Opera 9.0 - OK. Has its own tooltips turned on by default which can cover it up though.
194
+ # Opera 8.5 - OK. Has its own tooltips turned on by default which can cover it up though.
195
+ # Opera 8.0 - OK. Has its own tooltips turned on by default which can cover it up though.
196
+ # Opera 7.5 - OK. Has its own tooltips turned on by default which can cover it up though.
197
+ # Opera 7.0 - *Broken.* Usually works, if the window is too narrow may collapse completely.
198
+ #
199
+ # Konqueror 3.5 - OK
200
+ #
201
+
202
+
203
+ #
204
+ # Topic: Long code block scrolling
205
+ #
206
+ # Go to <Prototype Parameter Styles>.
207
+ #
208
+ # Tests:
209
+ #
210
+ # - Shrink the browser window so that a line extends past the end of it. Only the line should have a scrollbar, not the
211
+ # entire page.
212
+ # - Expand the browser window. The scrollbar should disappear.
213
+ #
214
+ # Results:
215
+ #
216
+ # Firefox 2.0 - OK
217
+ # Firefox 1.5 - OK
218
+ # Firefox 1.0 - OK
219
+ #
220
+ # IE 7.0 - OK
221
+ # IE 6.0 - OK
222
+ #
223
+ # Safari 3.0 - OK
224
+ # Safari 2.0 - OK
225
+ #
226
+ # Opera 9.0 - OK
227
+ # Opera 8.5 - OK
228
+ # Opera 8.0 - OK
229
+ # Opera 7.5 - OK
230
+ # Opera 7.0 - OK
231
+ #
232
+ # Konqueror 3.5 - OK
233
+ #
234
+
235
+
236
+ #
237
+ # Topic: Menu and Class Hierarchies
238
+ #
239
+ # Go to <NaturalDocs::Languages::Simple>.
240
+ #
241
+ # Tests:
242
+ #
243
+ # - Class hierarchy should look okay.
244
+ # - Make sure the menu hierarchy opens up on its own when the page is loaded.
245
+ # - You should be able to click on groups to open and close them.
246
+ #
247
+ # Results:
248
+ #
249
+ # Firefox 2.0 - OK
250
+ # Firefox 1.5 - OK
251
+ # Firefox 1.0 - OK
252
+ #
253
+ # IE 7.0 - OK
254
+ # IE 6.0 - OK
255
+ #
256
+ # Safari 3.0 - OK
257
+ # Safari 2.0 - OK
258
+ #
259
+ # Opera 9.0 - OK
260
+ # Opera 8.5 - OK
261
+ # Opera 8.0 - OK
262
+ # Opera 7.5 - OK
263
+ # Opera 7.0 - OK
264
+ #
265
+ # Konqueror 3.5 - OK
266
+ #
267
+
268
+
269
+ 1;
@@ -0,0 +1,107 @@
1
+
2
+ Title: Language Notes
3
+ _______________________________________________________________________________
4
+
5
+ This is more for my personal reference than anything else.
6
+
7
+
8
+ ___________________________________________________________________________
9
+
10
+ Topic: Prototype Parameter Styles
11
+ ___________________________________________________________________________
12
+
13
+ Parameters via Commas, Typed via Spaces:
14
+
15
+ > FunctionName ( type indentifier, type identifier = value, modifier type identifier )
16
+ > FunctionName ( indentifier, identifier = value )
17
+
18
+ The general idea is that parameters are separated by commas. Identifiers cannot contain spaces. Types and modifiers,
19
+ if available, are separated from the identifiers with spaces. There may be an equals sign to set the default value.
20
+
21
+ So parsing means splitting by commas, stripping everything past an equals sign for the default value, stripping everything
22
+ after the last space for the identifier, and the rest is the type. If there are no internal spaces after the default value is
23
+ stripped, it's all identifier.
24
+
25
+ Note that internal parenthesis, brackets, braces, and angle brackets should be parsed out. They may be present in default
26
+ values or types and any commas and equal signs in them should not be included.
27
+
28
+ Applies to C++, Java, C#, JavaScript, Python, PHP, Ruby.
29
+
30
+ Applies to Perl as well, even though it doesn't have any real parameter declaration structure. Just adding it with comments
31
+ is fine.
32
+
33
+ Parameters via Semicolons and Commas, Typed via Colons:
34
+
35
+ > FunctionName ( identifier: type; identifier, identifier: type; identifier: type := value )
36
+
37
+ Parameters via semicolons, types via colons. However, there can be more than one parameter per type via commas.
38
+ Default values via colon-equals.
39
+
40
+ Applies to Pascal, Ada.
41
+
42
+
43
+ SQL:
44
+
45
+ > FunctionName ( identifier type, identifier modifier type, identifier type := value )
46
+
47
+ Parameters separated by commas. Identifiers come before the types and are separated by a space. Default values are
48
+ specified with colon-equals.
49
+
50
+ > FunctionName @identifier type, @dentifier modifier type, @identifier type = value
51
+
52
+ Microsoft's SQL uses equals instead of colon-equals, doesn't need parenthesis, and starts its parameter names with an @
53
+ symbol.
54
+
55
+
56
+ Visual Basic:
57
+
58
+ > FunctionName ( modifiers identifier as type, identifier = value )
59
+
60
+ Parameters separated by commas. Default values via equals. However, any number of modifiers may appear before the
61
+ identifier. Those modifiers are ByVal, ByRef, Optional, and ParamArray.
62
+
63
+
64
+ Tcl:
65
+
66
+ > FunctionName { identifier identifier { whatever } } { code }
67
+
68
+ Identifiers are specified in the first set of braces and have no commas. However, they can be broken out into sub-braces.
69
+
70
+
71
+ ___________________________________________________________________________
72
+
73
+ Topic: Syntax References
74
+ ___________________________________________________________________________
75
+
76
+ C++ - http://www.csci.csusb.edu/dick/c++std/syntax.html
77
+
78
+ C# - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csspec/html/CSharpSpecStart.asp. Open in IE.
79
+
80
+ Java - http://cui.unige.ch/db-research/Enseignement/analyseinfo/
81
+ Ada - http://cui.unige.ch/db-research/Enseignement/analyseinfo/
82
+
83
+ SQL - http://cui.unige.ch/db-research/Enseignement/analyseinfo/,
84
+ <http://www.cs.umb.edu/cs634/ora9idocs/appdev.920/a96624/13_elems.htm>, or
85
+ <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_tsqlcon_6lyk.asp?frame=true> (open in IE).
86
+
87
+ JavaScript - http://academ.hvcc.edu/~kantopet/javascript/index.php
88
+
89
+ Python - http://www.python.org/doc/2.3.4/ref/ref.html
90
+
91
+ PHP - http://www.php.net/manual/en/langref.php
92
+
93
+ Visual Basic - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbls7/html/vbspecstart.asp. Open in IE.
94
+
95
+ Pascal - <http://pages.cpsc.ucalgary.ca/~becker/231/SyntaxDiagrams/pascal-syntax_files/frame.htm>. Open in IE.
96
+
97
+ Ruby - http://www.rubycentral.com/book/
98
+
99
+ ActionScript 2 - <http://download.macromedia.com/pub/documentation/en/flash/fl8/fl8_as2lr.pdf>
100
+ ActionScript 3 - <http://download.macromedia.com/pub/documentation/en/flex/2/prog_actionscript30.pdf>
101
+ E2X - http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-357.pdf
102
+
103
+ R - Somewhere on http://www.r-project.org.
104
+
105
+ ColdFusion - <http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Applications_with_CFML/contents.htm>
106
+
107
+ Eiffel - http://www.gobosoft.com/eiffel/syntax/