taskjuggler 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. data/Rakefile +1 -0
  2. data/benchmarks/depends.tjp +2 -1
  3. data/benchmarks/htmltaskreport.tjp +2 -1
  4. data/doc/classes/AppConfig.html +124 -120
  5. data/doc/classes/Arguments.html +10 -6
  6. data/doc/classes/Object.html +229 -0
  7. data/doc/classes/String.html +35 -31
  8. data/doc/classes/TaskJuggler/Account.html +18 -18
  9. data/doc/classes/TaskJuggler/AccountAttribute.html +261 -0
  10. data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
  11. data/doc/classes/TaskJuggler/Allocation.html +34 -30
  12. data/doc/classes/TaskJuggler/AllocationAttribute.html +70 -70
  13. data/doc/classes/TaskJuggler/AttributeBase.html +131 -147
  14. data/doc/classes/TaskJuggler/AttributeDefinition.html +38 -21
  15. data/doc/classes/TaskJuggler/BatchProcessor.html +313 -0
  16. data/doc/classes/TaskJuggler/Booking.html +22 -18
  17. data/doc/classes/TaskJuggler/BookingListAttribute.html +42 -42
  18. data/doc/classes/TaskJuggler/BooleanAttribute.html +40 -40
  19. data/doc/classes/TaskJuggler/CSVFile.html +28 -24
  20. data/doc/classes/TaskJuggler/Charge.html +22 -18
  21. data/doc/classes/TaskJuggler/ChargeListAttribute.html +30 -30
  22. data/doc/classes/TaskJuggler/ChargeSet.html +41 -37
  23. data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +46 -46
  24. data/doc/classes/TaskJuggler/ColumnListAttribute.html +231 -0
  25. data/doc/classes/TaskJuggler/ColumnTable.html +23 -21
  26. data/doc/classes/TaskJuggler/DateAttribute.html +20 -20
  27. data/doc/classes/TaskJuggler/DefinitionListAttribute.html +162 -0
  28. data/doc/classes/TaskJuggler/DependencyListAttribute.html +46 -46
  29. data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
  30. data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
  31. data/doc/classes/TaskJuggler/FlagListAttribute.html +42 -42
  32. data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
  33. data/doc/classes/TaskJuggler/FormatListAttribute.html +197 -0
  34. data/doc/classes/TaskJuggler/GanttChart.html +236 -207
  35. data/doc/classes/TaskJuggler/GanttContainer.html +46 -42
  36. data/doc/classes/TaskJuggler/GanttHeader.html +16 -12
  37. data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +16 -12
  38. data/doc/classes/TaskJuggler/GanttLine.html +28 -24
  39. data/doc/classes/TaskJuggler/GanttLoadStack.html +22 -18
  40. data/doc/classes/TaskJuggler/GanttMilestone.html +46 -42
  41. data/doc/classes/TaskJuggler/GanttRouter.html +104 -98
  42. data/doc/classes/TaskJuggler/GanttTaskBar.html +46 -42
  43. data/doc/classes/TaskJuggler/HTMLDocument.html +12 -12
  44. data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
  45. data/doc/classes/TaskJuggler/Interval.html +126 -120
  46. data/doc/classes/TaskJuggler/IntervalListAttribute.html +46 -46
  47. data/doc/classes/TaskJuggler/JobInfo.html +284 -0
  48. data/doc/classes/TaskJuggler/Journal.html +197 -0
  49. data/doc/classes/TaskJuggler/JournalEntry.html +218 -0
  50. data/doc/classes/TaskJuggler/KeywordArray.html +179 -0
  51. data/doc/classes/TaskJuggler/KeywordDocumentation.html +445 -396
  52. data/doc/classes/TaskJuggler/Limits/Limit.html +34 -30
  53. data/doc/classes/TaskJuggler/Limits.html +68 -62
  54. data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
  55. data/doc/classes/TaskJuggler/ListAttributeBase.html +207 -0
  56. data/doc/classes/TaskJuggler/Log.html +72 -68
  57. data/doc/classes/TaskJuggler/LogicalAttribute.html +38 -34
  58. data/doc/classes/TaskJuggler/LogicalExpression.html +16 -12
  59. data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +194 -0
  60. data/doc/classes/TaskJuggler/LogicalFlag.html +32 -32
  61. data/doc/classes/TaskJuggler/LogicalFunction.html +28 -24
  62. data/doc/classes/TaskJuggler/LogicalOperation.html +17 -13
  63. data/doc/classes/TaskJuggler/Macro.html +10 -6
  64. data/doc/classes/TaskJuggler/MacroParser.html +36 -36
  65. data/doc/classes/TaskJuggler/MacroTable.html +40 -36
  66. data/doc/classes/TaskJuggler/Message.html +16 -12
  67. data/doc/classes/TaskJuggler/MessageHandler.html +16 -12
  68. data/doc/classes/TaskJuggler/Navigator.html +249 -0
  69. data/doc/classes/TaskJuggler/OnShiftCache.html +316 -0
  70. data/doc/classes/TaskJuggler/Project.html +1064 -678
  71. data/doc/classes/TaskJuggler/ProjectFileParser.html +90 -85
  72. data/doc/classes/TaskJuggler/PropertyAttribute.html +194 -0
  73. data/doc/classes/TaskJuggler/PropertyList.html +114 -113
  74. data/doc/classes/TaskJuggler/PropertySet.html +355 -312
  75. data/doc/classes/TaskJuggler/PropertyTreeNode.html +527 -474
  76. data/doc/classes/TaskJuggler/Query.html +90 -85
  77. data/doc/classes/TaskJuggler/RTPNavigator.html +292 -0
  78. data/doc/classes/TaskJuggler/RTPReport.html +301 -0
  79. data/doc/classes/TaskJuggler/RealFormat.html +114 -57
  80. data/doc/classes/TaskJuggler/RealFormatAttribute.html +162 -0
  81. data/doc/classes/TaskJuggler/ReferenceAttribute.html +87 -20
  82. data/doc/classes/TaskJuggler/Report.html +82 -291
  83. data/doc/classes/TaskJuggler/ReportBase.html +448 -0
  84. data/doc/classes/TaskJuggler/ReportContext.html +243 -0
  85. data/doc/classes/TaskJuggler/ReportTable.html +158 -129
  86. data/doc/classes/TaskJuggler/ReportTableCell.html +30 -26
  87. data/doc/classes/TaskJuggler/ReportTableColumn.html +29 -25
  88. data/doc/classes/TaskJuggler/ReportTableLegend.html +28 -24
  89. data/doc/classes/TaskJuggler/ReportTableLine.html +34 -30
  90. data/doc/classes/TaskJuggler/Resource.html +12 -12
  91. data/doc/classes/TaskJuggler/ResourceListAttribute.html +46 -46
  92. data/doc/classes/TaskJuggler/ResourceListRE.html +49 -57
  93. data/doc/classes/TaskJuggler/ResourceScenario.html +126 -126
  94. data/doc/classes/TaskJuggler/RichText.html +52 -48
  95. data/doc/classes/TaskJuggler/RichTextAttribute.html +30 -30
  96. data/doc/classes/TaskJuggler/RichTextDocument.html +41 -37
  97. data/doc/classes/TaskJuggler/RichTextElement.html +274 -264
  98. data/doc/classes/TaskJuggler/RichTextException.html +13 -13
  99. data/doc/classes/TaskJuggler/RichTextParser.html +48 -47
  100. data/doc/classes/TaskJuggler/RichTextProtocolExample.html +52 -55
  101. data/doc/classes/TaskJuggler/RichTextProtocolHandler.html +55 -10
  102. data/doc/classes/TaskJuggler/RichTextScanner.html +106 -245
  103. data/doc/classes/TaskJuggler/RichTextSnip.html +28 -24
  104. data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +381 -301
  105. data/doc/classes/TaskJuggler/Scenario.html +6 -6
  106. data/doc/classes/TaskJuggler/ScenarioData.html +40 -36
  107. data/doc/classes/TaskJuggler/ScenarioListAttribute.html +229 -0
  108. data/doc/classes/TaskJuggler/Scoreboard.html +70 -66
  109. data/doc/classes/TaskJuggler/Shift.html +18 -18
  110. data/doc/classes/TaskJuggler/ShiftAssignment.html +58 -54
  111. data/doc/classes/TaskJuggler/ShiftAssignments.html +82 -78
  112. data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
  113. data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
  114. data/doc/classes/TaskJuggler/SortListAttribute.html +196 -0
  115. data/doc/classes/TaskJuggler/SourceFileInfo.html +16 -12
  116. data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
  117. data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
  118. data/doc/classes/TaskJuggler/SyntaxReference.html +46 -42
  119. data/doc/classes/TaskJuggler/TOCEntry.html +16 -12
  120. data/doc/classes/TaskJuggler/TableColumnDefinition.html +48 -33
  121. data/doc/classes/TaskJuggler/TableOfContents.html +22 -18
  122. data/doc/classes/TaskJuggler/TableReport.html +1036 -0
  123. data/doc/classes/TaskJuggler/Task.html +12 -12
  124. data/doc/classes/TaskJuggler/TaskDependency.html +16 -12
  125. data/doc/classes/TaskJuggler/TaskListAttribute.html +46 -46
  126. data/doc/classes/TaskJuggler/TaskListRE.html +49 -58
  127. data/doc/classes/TaskJuggler/TaskScenario.html +1270 -1180
  128. data/doc/classes/TaskJuggler/TextParser/Pattern.html +100 -96
  129. data/doc/classes/TaskJuggler/TextParser/Rule.html +88 -84
  130. data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -12
  131. data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
  132. data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +10 -6
  133. data/doc/classes/TaskJuggler/TextParser.html +203 -140
  134. data/doc/classes/TaskJuggler/TextReport.html +364 -0
  135. data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
  136. data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +50 -42
  137. data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +16 -12
  138. data/doc/classes/TaskJuggler/TextScanner.html +334 -240
  139. data/doc/classes/TaskJuggler/TjException.html +6 -6
  140. data/doc/classes/TaskJuggler/TjTime.html +547 -497
  141. data/doc/classes/TaskJuggler/TjpExample.html +29 -25
  142. data/doc/classes/TaskJuggler/TjpExportRE.html +77 -97
  143. data/doc/classes/TaskJuggler/TjpSyntaxRules.html +3911 -3886
  144. data/doc/classes/TaskJuggler/UserManual.html +54 -54
  145. data/doc/classes/TaskJuggler/WorkingHours.html +53 -49
  146. data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -85
  147. data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
  148. data/doc/classes/TaskJuggler/XMLComment.html +21 -21
  149. data/doc/classes/TaskJuggler/XMLDocument.html +28 -24
  150. data/doc/classes/TaskJuggler/XMLElement.html +70 -58
  151. data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
  152. data/doc/classes/TaskJuggler/XMLText.html +36 -36
  153. data/doc/classes/TaskJuggler.html +266 -183
  154. data/doc/files/COPYING.html +1 -1
  155. data/doc/files/README.html +1 -1
  156. data/doc/files/lib/AccountScenario_rb.html +1 -1
  157. data/doc/files/lib/Account_rb.html +1 -1
  158. data/doc/files/lib/Allocation_rb.html +1 -1
  159. data/doc/files/lib/AppConfig_rb.html +1 -1
  160. data/doc/files/lib/AttributeBase_rb.html +11 -1
  161. data/doc/files/lib/AttributeDefinition_rb.html +1 -1
  162. data/doc/files/lib/Attributes_rb.html +1 -1
  163. data/doc/files/lib/{LogicalFlag_rb.html → BatchProcessor_rb.html} +8 -6
  164. data/doc/files/lib/Booking_rb.html +1 -1
  165. data/doc/files/lib/ChargeSet_rb.html +1 -1
  166. data/doc/files/lib/Charge_rb.html +1 -1
  167. data/doc/files/lib/HTMLDocument_rb.html +1 -1
  168. data/doc/files/lib/Interval_rb.html +1 -1
  169. data/doc/files/lib/Journal_rb.html +106 -0
  170. data/doc/files/lib/KeywordArray_rb.html +106 -0
  171. data/doc/files/lib/KeywordDocumentation_rb.html +1 -1
  172. data/doc/files/lib/Limits_rb.html +1 -1
  173. data/doc/files/lib/Log_rb.html +1 -1
  174. data/doc/files/lib/LogicalExpression_rb.html +1 -3
  175. data/doc/files/lib/LogicalFunction_rb.html +1 -1
  176. data/doc/files/lib/LogicalOperation_rb.html +1 -1
  177. data/doc/files/lib/MacroParser_rb.html +1 -1
  178. data/doc/files/lib/MacroTable_rb.html +1 -1
  179. data/doc/files/lib/MessageHandler_rb.html +1 -1
  180. data/doc/files/lib/Message_rb.html +1 -1
  181. data/doc/files/lib/ProjectFileParser_rb.html +5 -1
  182. data/doc/files/lib/Project_rb.html +5 -1
  183. data/doc/files/lib/PropertyList_rb.html +1 -1
  184. data/doc/files/lib/PropertySet_rb.html +1 -1
  185. data/doc/files/lib/PropertyTreeNode_rb.html +1 -1
  186. data/doc/files/lib/Query_rb.html +1 -1
  187. data/doc/files/lib/RTPNavigator_rb.html +120 -0
  188. data/doc/files/lib/RTPReport_rb.html +118 -0
  189. data/doc/files/lib/RealFormat_rb.html +1 -1
  190. data/doc/files/lib/ResourceScenario_rb.html +1 -1
  191. data/doc/files/lib/Resource_rb.html +1 -1
  192. data/doc/files/lib/RichTextDocument_rb.html +1 -1
  193. data/doc/files/lib/RichTextElement_rb.html +1 -1
  194. data/doc/files/lib/RichTextParser_rb.html +1 -1
  195. data/doc/files/lib/RichTextProtocolExample_rb.html +1 -1
  196. data/doc/files/lib/RichTextProtocolHandler_rb.html +1 -1
  197. data/doc/files/lib/RichTextScanner_rb.html +1 -1
  198. data/doc/files/lib/RichTextSnip_rb.html +1 -1
  199. data/doc/files/lib/RichTextSyntaxRules_rb.html +1 -1
  200. data/doc/files/lib/RichText_rb.html +1 -1
  201. data/doc/files/lib/ScenarioData_rb.html +1 -1
  202. data/doc/files/lib/Scenario_rb.html +1 -1
  203. data/doc/files/lib/Scoreboard_rb.html +1 -1
  204. data/doc/files/lib/ShiftAssignments_rb.html +1 -1
  205. data/doc/files/lib/ShiftScenario_rb.html +1 -1
  206. data/doc/files/lib/Shift_rb.html +1 -1
  207. data/doc/files/lib/SourceFileInfo_rb.html +1 -1
  208. data/doc/files/lib/SyntaxReference_rb.html +1 -1
  209. data/doc/files/lib/TOCEntry_rb.html +1 -1
  210. data/doc/files/lib/TableColumnDefinition_rb.html +1 -1
  211. data/doc/files/lib/TableOfContents_rb.html +1 -1
  212. data/doc/files/lib/TaskDependency_rb.html +1 -1
  213. data/doc/files/lib/TaskJuggler_rb.html +1 -1
  214. data/doc/files/lib/TaskScenario_rb.html +1 -1
  215. data/doc/files/lib/Task_rb.html +1 -1
  216. data/doc/files/lib/TextParser/Pattern_rb.html +1 -1
  217. data/doc/files/lib/TextParser/Rule_rb.html +1 -1
  218. data/doc/files/lib/TextParser/StackElement_rb.html +1 -1
  219. data/doc/files/lib/TextParser/TokenDoc_rb.html +1 -1
  220. data/doc/files/lib/TextParser_rb.html +1 -1
  221. data/doc/files/lib/TextScanner_rb.html +1 -1
  222. data/doc/files/lib/Tj3Config_rb.html +1 -1
  223. data/doc/files/lib/TjException_rb.html +1 -1
  224. data/doc/files/lib/TjTime_rb.html +1 -1
  225. data/doc/files/lib/TjpExample_rb.html +1 -1
  226. data/doc/files/lib/TjpSyntaxRules_rb.html +1 -1
  227. data/doc/files/lib/UTF8String_rb.html +1 -1
  228. data/doc/files/lib/UserManual_rb.html +1 -1
  229. data/doc/files/lib/WorkingHours_rb.html +1 -1
  230. data/doc/files/lib/XMLDocument_rb.html +1 -1
  231. data/doc/files/lib/XMLElement_rb.html +1 -1
  232. data/doc/files/lib/deep_copy_rb.html +106 -0
  233. data/doc/files/lib/ms_test_rb.html +90 -0
  234. data/doc/files/lib/reports/CSVFile_rb.html +1 -1
  235. data/doc/files/lib/reports/ColumnTable_rb.html +1 -1
  236. data/doc/files/lib/reports/GanttChart_rb.html +1 -1
  237. data/doc/files/lib/reports/GanttContainer_rb.html +1 -1
  238. data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +1 -1
  239. data/doc/files/lib/reports/GanttHeader_rb.html +1 -1
  240. data/doc/files/lib/reports/GanttLine_rb.html +1 -1
  241. data/doc/files/lib/reports/GanttLoadStack_rb.html +1 -1
  242. data/doc/files/lib/reports/GanttMilestone_rb.html +1 -1
  243. data/doc/files/lib/reports/GanttRouter_rb.html +1 -1
  244. data/doc/files/lib/reports/GanttTaskBar_rb.html +1 -1
  245. data/doc/files/lib/reports/HTMLGraphics_rb.html +1 -1
  246. data/doc/files/lib/reports/{ReportElement_rb.html → Navigator_rb.html} +6 -8
  247. data/doc/files/lib/reports/ReportBase_rb.html +106 -0
  248. data/doc/files/lib/reports/ReportContext_rb.html +106 -0
  249. data/doc/files/lib/reports/ReportTableCell_rb.html +1 -1
  250. data/doc/files/lib/reports/ReportTableColumn_rb.html +1 -1
  251. data/doc/files/lib/reports/ReportTableLegend_rb.html +1 -1
  252. data/doc/files/lib/reports/ReportTableLine_rb.html +1 -1
  253. data/doc/files/lib/reports/ReportTable_rb.html +1 -1
  254. data/doc/files/lib/reports/Report_rb.html +8 -2
  255. data/doc/files/lib/reports/ResourceListRE_rb.html +2 -2
  256. data/doc/files/lib/reports/{ReportTableElement_rb.html → TableReport_rb.html} +7 -5
  257. data/doc/files/lib/reports/TaskListRE_rb.html +2 -2
  258. data/doc/files/lib/reports/TextReport_rb.html +116 -0
  259. data/doc/files/lib/reports/TjpExportRE_rb.html +2 -2
  260. data/doc/files/lib/taskjuggler3_rb.html +61 -56
  261. data/doc/files/lib/tj3man_rb.html +1 -1
  262. data/doc/fr_class_index.html +41 -3
  263. data/doc/fr_file_index.html +21 -5
  264. data/doc/fr_method_index.html +1069 -959
  265. data/examples/ContactList.html +1467 -0
  266. data/examples/Deliveries.html +485 -0
  267. data/examples/Development.html +2525 -0
  268. data/examples/Overview.html +747 -0
  269. data/examples/Resource Graph.html +616 -0
  270. data/examples/tutorial.tjp +63 -67
  271. data/lib/AttributeBase.rb +27 -31
  272. data/lib/AttributeDefinition.rb +12 -7
  273. data/lib/Attributes.rb +134 -34
  274. data/lib/Interval.rb +2 -0
  275. data/lib/Journal.rb +44 -0
  276. data/lib/{LogicalFlag.rb → KeywordArray.rb} +5 -13
  277. data/lib/KeywordDocumentation.rb +84 -47
  278. data/lib/Limits.rb +7 -5
  279. data/lib/LogicalExpression.rb +1 -1
  280. data/lib/LogicalOperation.rb +33 -0
  281. data/lib/Project.rb +313 -99
  282. data/lib/ProjectFileParser.rb +88 -11
  283. data/lib/PropertyList.rb +2 -1
  284. data/lib/PropertySet.rb +13 -4
  285. data/lib/PropertyTreeNode.rb +34 -15
  286. data/lib/Query.rb +2 -1
  287. data/lib/RTPNavigator.rb +53 -0
  288. data/lib/RTPReport.rb +62 -0
  289. data/lib/RealFormat.rb +28 -10
  290. data/lib/RichTextElement.rb +18 -12
  291. data/lib/RichTextParser.rb +1 -0
  292. data/lib/RichTextProtocolExample.rb +8 -11
  293. data/lib/RichTextProtocolHandler.rb +11 -1
  294. data/lib/RichTextScanner.rb +308 -164
  295. data/lib/RichTextSyntaxRules.rb +24 -0
  296. data/lib/TableColumnDefinition.rb +5 -1
  297. data/lib/TaskJuggler.rb +3 -2
  298. data/lib/TaskScenario.rb +123 -31
  299. data/lib/TextParser.rb +14 -3
  300. data/lib/TextScanner.rb +210 -34
  301. data/lib/Tj3Config.rb +1 -1
  302. data/lib/TjTime.rb +15 -0
  303. data/lib/TjpExample.rb +1 -1
  304. data/lib/TjpSyntaxRules.rb +674 -473
  305. data/lib/WorkingHours.rb +1 -1
  306. data/lib/XMLElement.rb +11 -3
  307. data/lib/deep_copy.rb +72 -0
  308. data/lib/ms_test.rb +27 -0
  309. data/lib/reports/ColumnTable.rb +7 -5
  310. data/lib/reports/GanttChart.rb +60 -34
  311. data/lib/reports/GanttHeader.rb +1 -1
  312. data/lib/reports/GanttRouter.rb +7 -5
  313. data/lib/reports/Navigator.rb +72 -0
  314. data/lib/reports/Report.rb +58 -73
  315. data/lib/reports/ReportBase.rb +241 -0
  316. data/lib/reports/ReportContext.rb +41 -0
  317. data/lib/reports/ReportTable.rb +7 -2
  318. data/lib/reports/ReportTableCell.rb +3 -3
  319. data/lib/reports/ResourceListRE.rb +19 -26
  320. data/lib/reports/{ReportTableElement.rb → TableReport.rb} +297 -97
  321. data/lib/reports/TaskListRE.rb +16 -24
  322. data/lib/reports/TextReport.rb +87 -0
  323. data/lib/reports/TjpExportRE.rb +55 -50
  324. data/lib/taskjuggler3.rb +6 -1
  325. data/manual/Getting_Started +57 -6
  326. data/manual/How_To_Contribute +2 -4
  327. data/manual/Intro +2 -2
  328. data/manual/Reporting_Bugs +9 -2
  329. data/manual/Rich_Text_Attributes +41 -0
  330. data/manual/Tutorial +219 -173
  331. data/tasks/test.rake +3 -0
  332. data/test/TestSuite/CSV-Reports/celltext.tjp +2 -1
  333. data/test/TestSuite/CSV-Reports/resourcereport.tjp +2 -1
  334. data/test/TestSuite/CSV-Reports/resourcereport_with_tasks.tjp +2 -1
  335. data/test/TestSuite/CSV-Reports/sortByTree.tjp +2 -1
  336. data/test/TestSuite/CSV-Reports/sortBy_duration.down.tjp +2 -1
  337. data/test/TestSuite/CSV-Reports/sortBy_effort.up.tjp +2 -1
  338. data/test/TestSuite/CSV-Reports/sortBy_plan.start.down.tjp +2 -1
  339. data/test/TestSuite/CSV-Reports/taskreport.tjp +2 -1
  340. data/test/TestSuite/CSV-Reports/taskreport_with_resources.tjp +2 -1
  341. data/test/TestSuite/HTML-Reports/depArrows.tjp +72 -0
  342. data/test/TestSuite/HTML-Reports/reference-export.html +187 -0
  343. data/test/TestSuite/HTML-Reports/reference.tjp +21 -0
  344. data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -1
  345. data/test/TestSuite/Scheduler/Correct/AutomaticMilestones.tjp +3 -3
  346. data/test/TestSuite/Scheduler/Correct/Booking.tjp +3 -3
  347. data/test/TestSuite/Scheduler/Correct/Container-2.tjp +37 -0
  348. data/test/TestSuite/Scheduler/Correct/Container.tjp +40 -0
  349. data/test/TestSuite/Scheduler/Correct/Depends.tjp +9 -14
  350. data/test/TestSuite/Scheduler/Correct/Duration.tjp +2 -1
  351. data/test/TestSuite/Scheduler/Correct/InheritStartEnd.tjp +20 -29
  352. data/test/TestSuite/Scheduler/Correct/Limits.tjp +11 -13
  353. data/test/TestSuite/Scheduler/Correct/Optimize-1.tjp +6 -5
  354. data/test/TestSuite/Scheduler/Correct/Optimize-2.tjp +10 -6
  355. data/test/TestSuite/Scheduler/Correct/Optimize-3.tjp +9 -6
  356. data/test/TestSuite/Scheduler/Correct/Optimize-4.tjp +9 -6
  357. data/test/TestSuite/Scheduler/Correct/Optimize-5.tjp +13 -10
  358. data/test/TestSuite/Scheduler/Correct/Precedes.tjp +9 -14
  359. data/test/TestSuite/Scheduler/Correct/Shift.tjp +9 -8
  360. data/test/TestSuite/Scheduler/Correct/checks.tji +4 -0
  361. data/test/TestSuite/Scheduler/Errors/weak_end_dep.tjp +16 -0
  362. data/test/TestSuite/Scheduler/Errors/weak_start_dep.tjp +16 -0
  363. data/test/TestSuite/Syntax/Correct/Account.tjp +1 -1
  364. data/test/TestSuite/Syntax/Correct/AutoID.tjp +21 -0
  365. data/test/TestSuite/Syntax/Correct/AutoMacros.tjp +2 -1
  366. data/test/TestSuite/Syntax/Correct/Caption.tjp +7 -6
  367. data/test/TestSuite/Syntax/Correct/Celltext.tjp +7 -4
  368. data/test/TestSuite/Syntax/Correct/Comments.tjp +1 -1
  369. data/test/TestSuite/Syntax/Correct/CompletedWork.tji +11 -19
  370. data/test/TestSuite/Syntax/Correct/CriticalPath.tjp +4 -3
  371. data/test/TestSuite/Syntax/Correct/Export.tjp +3 -1
  372. data/test/TestSuite/Syntax/Correct/Flags.tjp +2 -1
  373. data/test/TestSuite/Syntax/Correct/HtmlTaskReport.tjp +2 -1
  374. data/test/TestSuite/Syntax/Correct/Journal.tjp +18 -0
  375. data/test/TestSuite/Syntax/Correct/LoadUnits.tjp +2 -1
  376. data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +16 -0
  377. data/test/TestSuite/Syntax/Correct/Period.tjp +2 -1
  378. data/test/TestSuite/Syntax/Correct/RawHTML.tjp +4 -2
  379. data/test/TestSuite/Syntax/Correct/Reports.tjp +4 -2
  380. data/test/TestSuite/Syntax/Correct/ResourcePrefix.tji +2 -0
  381. data/test/TestSuite/Syntax/Correct/ResourcePrefix.tjp +23 -0
  382. data/test/TestSuite/Syntax/Correct/Responsible.tjp +1 -1
  383. data/test/TestSuite/Syntax/Correct/Simple.tjp +1 -1
  384. data/test/TestSuite/Syntax/Correct/String.tjp +1 -1
  385. data/test/TestSuite/Syntax/Correct/TaskRoot.tjp +2 -1
  386. data/test/TestSuite/Syntax/Correct/tutorial.tjp +92 -70
  387. data/test/TestSuite/Syntax/Errors/bad_comment.tjp +7 -0
  388. data/test/TestSuite/Syntax/Errors/bad_include.tjp +1 -1
  389. data/test/TestSuite/Syntax/Errors/bad_time_zone.tjp +6 -0
  390. data/test/TestSuite/Syntax/Errors/bad_timing_res.tjp +5 -0
  391. data/test/TestSuite/Syntax/Errors/chargeset_master.tjp +1 -1
  392. data/test/TestSuite/Syntax/Errors/container_attribute.tjp +1 -1
  393. data/test/TestSuite/Syntax/Errors/cost_acct_no_top.tjp +3 -2
  394. data/test/TestSuite/Syntax/Errors/cost_rev_same.tjp +1 -1
  395. data/test/TestSuite/Syntax/Errors/eof_in_istring1.tjp +5 -0
  396. data/test/TestSuite/Syntax/Errors/eof_in_istring2.tjp +5 -0
  397. data/test/TestSuite/Syntax/Errors/eof_in_istring3.tjp +6 -0
  398. data/test/TestSuite/Syntax/Errors/eof_in_istring4.tjp +6 -0
  399. data/test/TestSuite/Syntax/Errors/eof_in_istring5.tjp +6 -0
  400. data/test/TestSuite/Syntax/Errors/include_recursion.tji +1 -0
  401. data/test/TestSuite/Syntax/Errors/include_recursion.tjp +7 -0
  402. data/test/TestSuite/Syntax/Errors/junk_after_cut.tjp +6 -0
  403. data/test/TestSuite/Syntax/Errors/navigator_exists.tjp +10 -0
  404. data/test/TestSuite/Syntax/Errors/operand_unkn_flag.tjp +1 -1
  405. data/test/TestSuite/Syntax/Errors/report_end.tjp +1 -1
  406. data/test/TestSuite/Syntax/Errors/report_exists.tjp +10 -0
  407. data/test/TestSuite/Syntax/Errors/report_start.tjp +1 -1
  408. data/test/TestSuite/Syntax/Errors/rev_acct_no_top.tjp +1 -1
  409. data/test/TestSuite/Syntax/Errors/sort_direction.tjp +1 -1
  410. data/test/TestSuite/Syntax/Errors/sort_unknown_scen.tjp +1 -1
  411. data/test/TestSuite/Syntax/Errors/sorting_crit_exptd1.tjp +1 -1
  412. data/test/TestSuite/Syntax/Errors/sorting_crit_exptd2.tjp +1 -1
  413. data/test/TestSuite/Syntax/Errors/sorting_wbs.tjp +1 -1
  414. data/test/TestSuite/Syntax/Errors/too_large_timing_res.tjp +7 -0
  415. data/test/TestSuite/Syntax/Errors/unknown_scenario_idx.tjp +1 -1
  416. data/test/TestSuite/Syntax/Errors/unknown_task.tjp +1 -1
  417. data/test/all.rb +1 -16
  418. data/test/test_CSV-Reports.rb +8 -5
  419. data/test/test_Query.rb +2 -2
  420. data/test/test_RichText.rb +95 -0
  421. data/test/test_Scheduler.rb +8 -4
  422. data/test/test_Syntax.rb +8 -4
  423. data/test/test_deep_copy.rb +83 -0
  424. metadata +549 -487
  425. data/benchmarks/UTF-8-Strings.rb +0 -58
  426. data/doc/classes/TaskJuggler/ReportElement.html +0 -1070
  427. data/doc/classes/TaskJuggler/ReportTableElement.html +0 -644
  428. data/lib/reports/ReportElement.rb +0 -427
  429. data/test/TestSuite/Syntax/Correct/csvtest +0 -16
  430. data/test/TestSuite/Syntax/Errors/no_csv_suffix.tjp +0 -10
  431. data/test/TestSuite/Syntax/Errors/no_html_suffix.tjp +0 -10
  432. data/test/TestSuite/Syntax/Errors/report_redifinition.tjp +0 -10
@@ -39,9 +39,13 @@ class TaskJuggler
39
39
  # This is the position of the start of the currently processed line.
40
40
  # It's only used for error reporting.
41
41
  @lineStart = 0
42
- # Most of the wiki markup interpretation can be turned on/off by using
43
- # <nowiki>...</nowiki> in the text. This flag keeps this state.
44
- @wikiEnabled = true
42
+ # This variable stores the mode that the parser is operating in. The
43
+ # following modes are supported:
44
+ # :wiki : accept supported MediaWiki subset plus TJ extensions
45
+ # :nowiki : ignore most markup except for the </nowiki> token
46
+ # :funcarg : parse name and parameters of an block or inline parser
47
+ # function.
48
+ @mode = :wiki
45
49
  # Enable to trigger printout instead of exception.
46
50
  @debug = false
47
51
  end
@@ -62,170 +66,23 @@ class TaskJuggler
62
66
  return tok
63
67
  end
64
68
 
65
- # Some characters have only a special meaning at the start of the line.
66
- # When the last token pushed the cursor into a new line, this flag is set
67
- # to true.
68
- if @beginOfLine && @wikiEnabled
69
- # Reset the flag again.
70
- @beginOfLine = false
71
-
72
- # We already know that the last newline was a real linebreak. Further
73
- # newlines can safely be ignored.
74
- readSequence("\n")
75
-
76
- case (c = nextChar)
77
- when '='
78
- # Headings start with 2 or more = and must be followed by a space.
79
- level = readSequenceMax('=', 4)
80
- if level == 1
81
- # 1 = does not mean anything. Push it back and process it as normal
82
- # text further down.
83
- returnChar
84
- else
85
- # Between the = characters and the title text must be exactly one
86
- # space.
87
- return [ "TITLE#{level - 1}", '=' * level ] if nextChar == ' '
88
- # If that's missing, The = are treated as normal text further down.
89
- returnChar(level + 1)
90
- end
91
- when '-'
92
- # Horizontal ruler. Must have exactly 4 -.
93
- level = readSequenceMax('-', 4)
94
- return [ "HLINE", '-' * 4 ] if level == 4
95
- returnChar(level)
96
- when '*'
97
- # Bullet lists start with one to three * characters.
98
- level = readSequenceMax('*')
99
- # Between the * characters and the bullet text must be exactly one
100
- # space.
101
- return [ "BULLET#{level}", '*' * level ] if nextChar == ' '
102
- # If that's missing, The # are treated as normal text further down.
103
- returnChar(level + 1)
104
- when '#'
105
- # Numbered list start with one to three # characters.
106
- level = readSequenceMax('#')
107
- # Between the # characters and the bullet text must be exactly one
108
- # space.
109
- return [ "NUMBER#{level}", '#' * level ] if nextChar == ' '
110
- # If that's missing, The # are treated as normal text further down.
111
- returnChar(level + 1)
112
- when ' '
113
- # Lines that start with a space are treated as verbatim text.
114
- return [ "PRE", readCode ] if (c = peek) && c != "\n"
115
- else
116
- # If the character is not a known control character we push it back
117
- # and treat it as normal text further down.
118
- returnChar
69
+ if @mode == :funcarg
70
+ return nextTokenFuncArg
71
+ end
72
+ if @beginOfLine && @mode == :wiki
73
+ if (res = nextTokenWikiBOL)
74
+ return res
119
75
  end
120
76
  end
121
77
 
122
- # Not all sequences of inline markup characters are control sequences. In
123
- # case we detect a sequence that has not the right number of characters,
124
- # we push them back and start over with this flag set to true.
125
- ignoreInlineMarkup = false
126
-
78
+ # Many inline control character sequences consit of multiple characters.
79
+ # In case of incomplete sequences, we roll back to the start character
80
+ # and set the ignoreInlineMarkup flag to simply treat them as normal
81
+ # text.
82
+ @ignoreInlineMarkup = false
127
83
  loop do
128
- c = nextChar
129
- if c.nil?
130
- # We've reached the end of the text.
131
- return [ '.', '<END>' ]
132
- elsif c == ' ' || c == "\t"
133
- # Sequences of tabs or spaces are treated as token boundaries, but
134
- # otherwise they are ignored.
135
- readSequence(' ', "\t")
136
- return [ 'SPACE', ' ' ]
137
- elsif c == "'" && !ignoreInlineMarkup && @wikiEnabled
138
- # Sequence of 2 ' means italic, 3 ' means bold, 4 ' means monospaced
139
- # code, 5 ' means italic and bold. Anything else is just normal text.
140
- level = readSequenceMax("'", 5)
141
- if level == 2
142
- return [ 'ITALIC', "'" * level ]
143
- elsif level == 3
144
- return [ 'BOLD', "'" * level ]
145
- elsif level == 4
146
- return [ 'CODE', "'" * level ]
147
- elsif level == 5
148
- return [ 'BOLDITALIC', "'" * level ]
149
- else
150
- # We have not found the right syntax. Treat the found characters as
151
- # normal text. Push all ' back and start again but ignoring the '
152
- # code for once.
153
- returnChar(level)
154
- ignoreInlineMarkup = true
155
- next
156
- end
157
- elsif c == '=' && !ignoreInlineMarkup && @wikiEnabled
158
- level = readSequenceMax('=', 4)
159
- if level > 1
160
- return [ "TITLE#{level - 1}END", '=' * level ]
161
- else
162
- # We have not found the right syntax. Treat found characters as
163
- # normal text. Push all = back and start again but ignoring the =
164
- # code for once.
165
- returnChar(level)
166
- ignoreInlineMarkup = true
167
- next
168
- end
169
- elsif c == '[' && @wikiEnabled
170
- level = readSequenceMax('[', 2)
171
- return [ level == 1 ? 'HREF' : 'REF', '[' * level ]
172
- elsif c == ']' && @wikiEnabled
173
- level = readSequenceMax(']', 2)
174
- return [ level == 1 ? 'HREFEND' : 'REFEND', ']' * level ]
175
- elsif c == "\n"
176
- # Newlines are pretty important as they can terminate blocks and turn
177
- # the next character into the start of a control sequence.
178
- # Hard linebreaks consist of a newline followed by another newline or
179
- # any of the begin-of-line control characters.
180
- if (c = nextChar) && "\n*# =-".include?(c)
181
- returnChar if c != "\n"
182
- # The next character may be a control character.
183
- @beginOfLine = true
184
- return [ 'LINEBREAK', "\n" ]
185
- elsif c.nil?
186
- # We hit the end of the text.
187
- return [ '.', '<END>' ]
188
- else
189
- # Single line breaks are treated as spaces. Return the char after
190
- # the newline and start with this one again.
191
- returnChar
192
- return [ 'SPACE', ' ' ]
193
- end
194
- elsif c == '<'
195
- if peekMatch('nowiki>')
196
- # Turn most wiki markup interpretation off.
197
- @pos += 'nowiki>'.length
198
- @wikiEnabled = false
199
- next
200
- elsif peekMatch('/nowiki>')
201
- # Turn most wiki markup interpretation on.
202
- @pos += '/nowiki>'.length
203
- @wikiEnabled = true
204
- next
205
- else
206
- returnChar
207
- end
208
- else
209
- # Reset this flag again.
210
- ignoreInlineMarkup = false
211
- str = ''
212
- str << c
213
- # Now we can collect characters of a word until we hit a whitespace.
214
- while (c = nextChar) && !" \n\t".include?(c)
215
- if @wikiEnabled
216
- # Or at least to ' characters in a row.
217
- break if c == "'" && peek == "'"
218
- # Or a ] or <
219
- break if ']<'.include?(c)
220
- else
221
- # Make sure we find the </nowiki> tag even within a word.
222
- break if c == '<'
223
- end
224
- str << c
225
- end
226
- # Return the character that indicated the word end.
227
- returnChar
228
- return [ 'WORD', str ]
84
+ if res = (@mode == :wiki ? nextTokenWikiInline : nextTokenNoWikiInline)
85
+ return res
229
86
  end
230
87
  end
231
88
  end
@@ -262,6 +119,256 @@ class TaskJuggler
262
119
 
263
120
  private
264
121
 
122
+ # Function arguments have the following formats:
123
+ # <[blockfunc par1="value1" par2='value2']>
124
+ # <-inlinefunc par1="value1" ... ->
125
+ def nextTokenFuncArg
126
+ token = [ '.', '<END>' ]
127
+ while c = nextChar
128
+ case c
129
+ when ' ', "\n", "\t"
130
+ if (tok = readBlanks(c))
131
+ token = tok
132
+ break
133
+ end
134
+ when '='
135
+ return [ '_=', '=' ]
136
+ when "'"
137
+ return readString(c)
138
+ when '"'
139
+ return readString(c)
140
+ when 'a'..'z', 'A'..'Z', '_'
141
+ return readId(c)
142
+ when ']'
143
+ if nextChar == '>'
144
+ @mode = :wiki
145
+ return [ 'BLOCKFUNCEND', ']>' ]
146
+ end
147
+ returnChar
148
+ when '-'
149
+ if nextChar == '>'
150
+ @mode = :wiki
151
+ return [ 'INLINEFUNCEND', '->' ]
152
+ end
153
+ returnChar
154
+ end
155
+ end
156
+ end
157
+
158
+ def nextTokenWikiBOL
159
+ # Some characters have only a special meaning at the start of the line.
160
+ # When the last token pushed the cursor into a new line, this flag is set
161
+ # to true.
162
+
163
+ # Reset the flag again.
164
+ @beginOfLine = false
165
+
166
+ # We already know that the last newline was a real linebreak. Further
167
+ # newlines can safely be ignored.
168
+ readSequence("\n")
169
+
170
+ # All the lead characters of a token here also need to be registered
171
+ # with nextTokenNewline!
172
+ case (c = nextChar)
173
+ when '='
174
+ # Headings start with 2 or more = and must be followed by a space.
175
+ level = readSequenceMax('=', 4)
176
+ if level == 1
177
+ # 1 = does not mean anything. Push it back and process it as normal
178
+ # text further down.
179
+ returnChar
180
+ else
181
+ # Between the = characters and the title text must be exactly one
182
+ # space.
183
+ return [ "TITLE#{level - 1}", '=' * level ] if nextChar == ' '
184
+ # If that's missing, The = are treated as normal text further down.
185
+ returnChar(level + 1)
186
+ end
187
+ when '-'
188
+ # Horizontal ruler. Must have exactly 4 -.
189
+ level = readSequenceMax('-', 4)
190
+ return [ "HLINE", '-' * 4 ] if level == 4
191
+ returnChar(level)
192
+ when '*'
193
+ # Bullet lists start with one to three * characters.
194
+ level = readSequenceMax('*')
195
+ # Between the * characters and the bullet text must be exactly one
196
+ # space.
197
+ return [ "BULLET#{level}", '*' * level ] if nextChar == ' '
198
+ # If that's missing, The # are treated as normal text further down.
199
+ returnChar(level + 1)
200
+ when '#'
201
+ # Numbered list start with one to three # characters.
202
+ level = readSequenceMax('#')
203
+ # Between the # characters and the bullet text must be exactly one
204
+ # space.
205
+ return [ "NUMBER#{level}", '#' * level ] if nextChar == ' '
206
+ # If that's missing, The # are treated as normal text further down.
207
+ returnChar(level + 1)
208
+ when '<'
209
+ # This may be the start of a block generating function.
210
+ if nextChar == '['
211
+ # Switch the parser to block function argument parsing mode.
212
+ @mode = :funcarg
213
+ return [ 'BLOCKFUNCSTART', '<[' ]
214
+ end
215
+ # Maybe not.
216
+ returnChar(2)
217
+ when ' '
218
+ # Lines that start with a space are treated as verbatim text.
219
+ return [ "PRE", readCode ] if (c = peek) && c != "\n"
220
+ else
221
+ # If the character is not a known control character we push it back
222
+ # and treat it as normal text further down.
223
+ returnChar
224
+ end
225
+
226
+ return nil
227
+ end
228
+
229
+ def nextTokenWikiInline
230
+ c = nextChar
231
+ if c.nil?
232
+ # We've reached the end of the text.
233
+ [ '.', '<END>' ]
234
+ elsif c == ' ' || c == "\t"
235
+ # Sequences of tabs or spaces are treated as token boundaries, but
236
+ # otherwise they are ignored.
237
+ readSequence(' ', "\t")
238
+ [ 'SPACE', ' ' ]
239
+ elsif c == "'" && !@ignoreInlineMarkup
240
+ # Sequence of 2 ' means italic, 3 ' means bold, 4 ' means monospaced
241
+ # code, 5 ' means italic and bold. Anything else is just normal text.
242
+ level = readSequenceMax("'", 5)
243
+ if level == 2
244
+ [ 'ITALIC', "'" * level ]
245
+ elsif level == 3
246
+ [ 'BOLD', "'" * level ]
247
+ elsif level == 4
248
+ [ 'CODE', "'" * level ]
249
+ elsif level == 5
250
+ [ 'BOLDITALIC', "'" * level ]
251
+ else
252
+ # We have not found the right syntax. Treat the found characters as
253
+ # normal text. Push all ' back and start again but ignoring the '
254
+ # code for once.
255
+ returnChar(level)
256
+ @ignoreInlineMarkup = true
257
+ nil
258
+ end
259
+ elsif c == '=' && !@ignoreInlineMarkup
260
+ level = readSequenceMax('=', 4)
261
+ if level > 1
262
+ [ "TITLE#{level - 1}END", '=' * level ]
263
+ else
264
+ # We have not found the right syntax. Treat found characters as
265
+ # normal text. Push all = back and start again but ignoring the =
266
+ # code for once.
267
+ returnChar(level)
268
+ @ignoreInlineMarkup = true
269
+ nil
270
+ end
271
+ elsif c == '['
272
+ level = readSequenceMax('[', 2)
273
+ [ level == 1 ? 'HREF' : 'REF', '[' * level ]
274
+ elsif c == ']'
275
+ level = readSequenceMax(']', 2)
276
+ [ level == 1 ? 'HREFEND' : 'REFEND', ']' * level ]
277
+ elsif c == "\n"
278
+ nextTokenNewline
279
+ elsif c == '<' && !@ignoreInlineMarkup
280
+ nextTokenOpenAngle
281
+ else
282
+ nextTokenWord(c)
283
+ end
284
+ end
285
+
286
+ def nextTokenNoWikiInline
287
+ c = nextChar
288
+ if c.nil?
289
+ # We've reached the end of the text.
290
+ [ '.', '<END>' ]
291
+ elsif c == ' ' || c == "\t"
292
+ # Sequences of tabs or spaces are treated as token boundaries, but
293
+ # otherwise they are ignored.
294
+ readSequence(' ', "\t")
295
+ [ 'SPACE', ' ' ]
296
+ elsif c == "\n"
297
+ nextTokenNewline
298
+ elsif c == '<' && !@ignoreInlineMarkup
299
+ nextTokenOpenAngle
300
+ else
301
+ nextTokenWord(c)
302
+ end
303
+ end
304
+
305
+ # We've just read a newline. Now we need to figure out whether this is a
306
+ # LINEBREAK or just a SPACE. This is determined by looking at the next
307
+ # character.
308
+ def nextTokenNewline
309
+ # Newlines are pretty important as they can terminate blocks and turn
310
+ # the next character into the start of a control sequence.
311
+ # Hard linebreaks consist of a newline followed by another newline or
312
+ # any of the begin-of-line control characters.
313
+ if (c = nextChar) && "\n*#< =-".include?(c)
314
+ returnChar if c != "\n"
315
+ # The next character may be a control character.
316
+ @beginOfLine = true
317
+ [ 'LINEBREAK', "\n" ]
318
+ elsif c.nil?
319
+ # We hit the end of the text.
320
+ [ '.', '<END>' ]
321
+ else
322
+ # Single line breaks are treated as spaces. Return the char after
323
+ # the newline and start with this one again.
324
+ returnChar
325
+ [ 'SPACE', ' ' ]
326
+ end
327
+ end
328
+
329
+ def nextTokenOpenAngle
330
+ if peekMatch('nowiki>')
331
+ # Turn most wiki markup interpretation off.
332
+ @pos += 'nowiki>'.length
333
+ @mode = :nowiki
334
+ elsif peekMatch('/nowiki>')
335
+ # Turn most wiki markup interpretation on.
336
+ @pos += '/nowiki>'.length
337
+ @mode = :wiki
338
+ else
339
+ # We've not found a valid control sequence. Push back the character
340
+ # and make sure we treat it as a normal character.
341
+ @ignoreInlineMarkup = true
342
+ returnChar
343
+ end
344
+ nil
345
+ end
346
+
347
+ # _c_ does not match any start of a control sequence, so we read
348
+ # characters until we find the end of the word.
349
+ def nextTokenWord(c)
350
+ # Reset this flag again.
351
+ @ignoreInlineMarkup = false
352
+ str = ''
353
+ str << c
354
+ # Now we can collect characters of a word until we hit a whitespace.
355
+ while (c = nextChar) && !" \n\t".include?(c)
356
+ if @mode == :wiki
357
+ # Or at least to ' characters in a row.
358
+ break if c == "'" && peek == "'"
359
+ # Or a ] or <
360
+ break if ']<'.include?(c)
361
+ else
362
+ # Make sure we find the </nowiki> tag even within a word.
363
+ break if c == '<'
364
+ end
365
+ str << c
366
+ end
367
+ # Return the character that indicated the word end.
368
+ returnChar
369
+ [ 'WORD', str ]
370
+ end
371
+
265
372
  # Deliver the next character. Keep track of the cursor position. In case we
266
373
  # reach the end, nil is returned.
267
374
  def nextChar
@@ -317,7 +424,7 @@ class TaskJuggler
317
424
  def peekMatch(word)
318
425
  # Since Ruby 1.9 is returning Strings for String#[] we need to emulate
319
426
  # this for Ruby 1.8.
320
- '' << @text[@pos, word.length] == word
427
+ ('' << @text[@pos, word.length]) == word
321
428
  end
322
429
 
323
430
  # Read a sequence of characters that are all contained in the _chars_ Array.
@@ -368,6 +475,43 @@ class TaskJuggler
368
475
  tok
369
476
  end
370
477
 
478
+ def readBlanks(c)
479
+ loop do
480
+ if c != ' ' && c != "\n" && c != "\t"
481
+ returnChar
482
+ return nil
483
+ end
484
+ c = nextChar
485
+ end
486
+ end
487
+
488
+ def readId(c)
489
+ token = ""
490
+ token << c
491
+ while (c = nextChar) &&
492
+ (('a'..'z') === c || ('A'..'Z') === c || ('0'..'9') === c ||
493
+ c == '_')
494
+ token << c
495
+ end
496
+ returnChar
497
+ return [ 'ID', token ]
498
+ end
499
+
500
+ def readString(terminator)
501
+ token = ""
502
+ while (c = nextChar) && c != terminator
503
+ if c == "\\"
504
+ # Terminators can be used as regular characters when prefixed by a \.
505
+ if (c = nextChar) && c != terminator
506
+ # \ followed by non-terminator. Just add both.
507
+ token << "\\"
508
+ end
509
+ end
510
+ token << c
511
+ end
512
+
513
+ [ 'STRING', token ]
514
+ end
371
515
  end
372
516
 
373
517
  # Exception raised by the RichTextScanner in case of processing errors. Its
@@ -59,6 +59,9 @@ class TaskJuggler
59
59
  @numberListCounter = [ 0, 0, 0 ]
60
60
  RichTextElement.new(@richText, :numberlist1, @val[0])
61
61
  })
62
+ pattern(%w( !blockFunction !blankLines ), lambda {
63
+ @val[0]
64
+ })
62
65
  end
63
66
 
64
67
  def rule_headlines
@@ -259,6 +262,27 @@ class TaskJuggler
259
262
  pattern(%w( $SPACE ))
260
263
  end
261
264
 
265
+ def rule_blockFunction
266
+ pattern(%w( $BLOCKFUNCSTART $ID !functionArguments $BLOCKFUNCEND ),
267
+ lambda {
268
+ args = {}
269
+ @val[2].each { |arg| args[arg[0]] = arg[1] }
270
+ el = RichTextElement.new(@richText, :blockfunc)
271
+ # Data is a 2 element Array with the function name and a Hash for the
272
+ # arguments.
273
+ el.data = [@val[1], args ]
274
+ el
275
+ })
276
+ end
277
+
278
+ def rule_functionArguments
279
+ optional
280
+ repeatable
281
+ pattern(%w( $ID _= $STRING ), lambda {
282
+ [ @val[0], @val[2] ]
283
+ })
284
+ end
285
+
262
286
  end
263
287
 
264
288
  end
@@ -18,7 +18,8 @@ class TaskJuggler
18
18
  class TableColumnDefinition
19
19
 
20
20
  attr_reader :id
21
- attr_accessor :cellText, :hideCellText, :cellURL, :title, :scale, :width,
21
+ attr_accessor :cellText, :hideCellText, :cellURL, :hideCellURL,
22
+ :title, :scale, :width,
22
23
  :content, :column
23
24
 
24
25
  def initialize(id, title)
@@ -34,6 +35,9 @@ class TaskJuggler
34
35
  @hideCellText = nil
35
36
  # The cell text can be associated with a hyperlink.
36
37
  @cellURL = nil
38
+ # A LogicalExpression that is evaluated for every cell. If the result is
39
+ # true, the cellURL will be ignored.
40
+ @hideCellURL = nil
37
41
  # The content attribute is only used for calendar columns. It specifies
38
42
  # what content should be displayed in the colendar columns.
39
43
  @content = 'load'
data/lib/TaskJuggler.rb CHANGED
@@ -41,7 +41,7 @@ class TaskJuggler
41
41
  parser = ProjectFileParser.new(@messageHandler)
42
42
  files.each do |file|
43
43
  begin
44
- parser.open(file)
44
+ parser.open(file, master)
45
45
  rescue TjException
46
46
  Log.exit('parser')
47
47
  return false
@@ -73,7 +73,8 @@ class TaskJuggler
73
73
  # Generate all specified reports. The project must have be scheduled before
74
74
  # this method can be called. It returns true if no error occured, false
75
75
  # otherwise.
76
- def generateReports
76
+ def generateReports(outputDir)
77
+ @project.outputDir = outputDir
77
78
  Log.enter('reports', 'Generating reports ...')
78
79
  res = @project.generateReports(@maxCpuCores)
79
80
  Log.exit('reports')