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.
- data/Rakefile +1 -0
- data/benchmarks/depends.tjp +2 -1
- data/benchmarks/htmltaskreport.tjp +2 -1
- data/doc/classes/AppConfig.html +124 -120
- data/doc/classes/Arguments.html +10 -6
- data/doc/classes/Object.html +229 -0
- data/doc/classes/String.html +35 -31
- data/doc/classes/TaskJuggler/Account.html +18 -18
- data/doc/classes/TaskJuggler/AccountAttribute.html +261 -0
- data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
- data/doc/classes/TaskJuggler/Allocation.html +34 -30
- data/doc/classes/TaskJuggler/AllocationAttribute.html +70 -70
- data/doc/classes/TaskJuggler/AttributeBase.html +131 -147
- data/doc/classes/TaskJuggler/AttributeDefinition.html +38 -21
- data/doc/classes/TaskJuggler/BatchProcessor.html +313 -0
- data/doc/classes/TaskJuggler/Booking.html +22 -18
- data/doc/classes/TaskJuggler/BookingListAttribute.html +42 -42
- data/doc/classes/TaskJuggler/BooleanAttribute.html +40 -40
- data/doc/classes/TaskJuggler/CSVFile.html +28 -24
- data/doc/classes/TaskJuggler/Charge.html +22 -18
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +30 -30
- data/doc/classes/TaskJuggler/ChargeSet.html +41 -37
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/ColumnListAttribute.html +231 -0
- data/doc/classes/TaskJuggler/ColumnTable.html +23 -21
- data/doc/classes/TaskJuggler/DateAttribute.html +20 -20
- data/doc/classes/TaskJuggler/DefinitionListAttribute.html +162 -0
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
- data/doc/classes/TaskJuggler/FlagListAttribute.html +42 -42
- data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FormatListAttribute.html +197 -0
- data/doc/classes/TaskJuggler/GanttChart.html +236 -207
- data/doc/classes/TaskJuggler/GanttContainer.html +46 -42
- data/doc/classes/TaskJuggler/GanttHeader.html +16 -12
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +16 -12
- data/doc/classes/TaskJuggler/GanttLine.html +28 -24
- data/doc/classes/TaskJuggler/GanttLoadStack.html +22 -18
- data/doc/classes/TaskJuggler/GanttMilestone.html +46 -42
- data/doc/classes/TaskJuggler/GanttRouter.html +104 -98
- data/doc/classes/TaskJuggler/GanttTaskBar.html +46 -42
- data/doc/classes/TaskJuggler/HTMLDocument.html +12 -12
- data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
- data/doc/classes/TaskJuggler/Interval.html +126 -120
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/JobInfo.html +284 -0
- data/doc/classes/TaskJuggler/Journal.html +197 -0
- data/doc/classes/TaskJuggler/JournalEntry.html +218 -0
- data/doc/classes/TaskJuggler/KeywordArray.html +179 -0
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +445 -396
- data/doc/classes/TaskJuggler/Limits/Limit.html +34 -30
- data/doc/classes/TaskJuggler/Limits.html +68 -62
- data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ListAttributeBase.html +207 -0
- data/doc/classes/TaskJuggler/Log.html +72 -68
- data/doc/classes/TaskJuggler/LogicalAttribute.html +38 -34
- data/doc/classes/TaskJuggler/LogicalExpression.html +16 -12
- data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +194 -0
- data/doc/classes/TaskJuggler/LogicalFlag.html +32 -32
- data/doc/classes/TaskJuggler/LogicalFunction.html +28 -24
- data/doc/classes/TaskJuggler/LogicalOperation.html +17 -13
- data/doc/classes/TaskJuggler/Macro.html +10 -6
- data/doc/classes/TaskJuggler/MacroParser.html +36 -36
- data/doc/classes/TaskJuggler/MacroTable.html +40 -36
- data/doc/classes/TaskJuggler/Message.html +16 -12
- data/doc/classes/TaskJuggler/MessageHandler.html +16 -12
- data/doc/classes/TaskJuggler/Navigator.html +249 -0
- data/doc/classes/TaskJuggler/OnShiftCache.html +316 -0
- data/doc/classes/TaskJuggler/Project.html +1064 -678
- data/doc/classes/TaskJuggler/ProjectFileParser.html +90 -85
- data/doc/classes/TaskJuggler/PropertyAttribute.html +194 -0
- data/doc/classes/TaskJuggler/PropertyList.html +114 -113
- data/doc/classes/TaskJuggler/PropertySet.html +355 -312
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +527 -474
- data/doc/classes/TaskJuggler/Query.html +90 -85
- data/doc/classes/TaskJuggler/RTPNavigator.html +292 -0
- data/doc/classes/TaskJuggler/RTPReport.html +301 -0
- data/doc/classes/TaskJuggler/RealFormat.html +114 -57
- data/doc/classes/TaskJuggler/RealFormatAttribute.html +162 -0
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +87 -20
- data/doc/classes/TaskJuggler/Report.html +82 -291
- data/doc/classes/TaskJuggler/ReportBase.html +448 -0
- data/doc/classes/TaskJuggler/ReportContext.html +243 -0
- data/doc/classes/TaskJuggler/ReportTable.html +158 -129
- data/doc/classes/TaskJuggler/ReportTableCell.html +30 -26
- data/doc/classes/TaskJuggler/ReportTableColumn.html +29 -25
- data/doc/classes/TaskJuggler/ReportTableLegend.html +28 -24
- data/doc/classes/TaskJuggler/ReportTableLine.html +34 -30
- data/doc/classes/TaskJuggler/Resource.html +12 -12
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/ResourceListRE.html +49 -57
- data/doc/classes/TaskJuggler/ResourceScenario.html +126 -126
- data/doc/classes/TaskJuggler/RichText.html +52 -48
- data/doc/classes/TaskJuggler/RichTextAttribute.html +30 -30
- data/doc/classes/TaskJuggler/RichTextDocument.html +41 -37
- data/doc/classes/TaskJuggler/RichTextElement.html +274 -264
- data/doc/classes/TaskJuggler/RichTextException.html +13 -13
- data/doc/classes/TaskJuggler/RichTextParser.html +48 -47
- data/doc/classes/TaskJuggler/RichTextProtocolExample.html +52 -55
- data/doc/classes/TaskJuggler/RichTextProtocolHandler.html +55 -10
- data/doc/classes/TaskJuggler/RichTextScanner.html +106 -245
- data/doc/classes/TaskJuggler/RichTextSnip.html +28 -24
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +381 -301
- data/doc/classes/TaskJuggler/Scenario.html +6 -6
- data/doc/classes/TaskJuggler/ScenarioData.html +40 -36
- data/doc/classes/TaskJuggler/ScenarioListAttribute.html +229 -0
- data/doc/classes/TaskJuggler/Scoreboard.html +70 -66
- data/doc/classes/TaskJuggler/Shift.html +18 -18
- data/doc/classes/TaskJuggler/ShiftAssignment.html +58 -54
- data/doc/classes/TaskJuggler/ShiftAssignments.html +82 -78
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
- data/doc/classes/TaskJuggler/SortListAttribute.html +196 -0
- data/doc/classes/TaskJuggler/SourceFileInfo.html +16 -12
- data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
- data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
- data/doc/classes/TaskJuggler/SyntaxReference.html +46 -42
- data/doc/classes/TaskJuggler/TOCEntry.html +16 -12
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +48 -33
- data/doc/classes/TaskJuggler/TableOfContents.html +22 -18
- data/doc/classes/TaskJuggler/TableReport.html +1036 -0
- data/doc/classes/TaskJuggler/Task.html +12 -12
- data/doc/classes/TaskJuggler/TaskDependency.html +16 -12
- data/doc/classes/TaskJuggler/TaskListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/TaskListRE.html +49 -58
- data/doc/classes/TaskJuggler/TaskScenario.html +1270 -1180
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +100 -96
- data/doc/classes/TaskJuggler/TextParser/Rule.html +88 -84
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -12
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +10 -6
- data/doc/classes/TaskJuggler/TextParser.html +203 -140
- data/doc/classes/TaskJuggler/TextReport.html +364 -0
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +50 -42
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +16 -12
- data/doc/classes/TaskJuggler/TextScanner.html +334 -240
- data/doc/classes/TaskJuggler/TjException.html +6 -6
- data/doc/classes/TaskJuggler/TjTime.html +547 -497
- data/doc/classes/TaskJuggler/TjpExample.html +29 -25
- data/doc/classes/TaskJuggler/TjpExportRE.html +77 -97
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +3911 -3886
- data/doc/classes/TaskJuggler/UserManual.html +54 -54
- data/doc/classes/TaskJuggler/WorkingHours.html +53 -49
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -85
- data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
- data/doc/classes/TaskJuggler/XMLComment.html +21 -21
- data/doc/classes/TaskJuggler/XMLDocument.html +28 -24
- data/doc/classes/TaskJuggler/XMLElement.html +70 -58
- data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
- data/doc/classes/TaskJuggler/XMLText.html +36 -36
- data/doc/classes/TaskJuggler.html +266 -183
- data/doc/files/COPYING.html +1 -1
- data/doc/files/README.html +1 -1
- data/doc/files/lib/AccountScenario_rb.html +1 -1
- data/doc/files/lib/Account_rb.html +1 -1
- data/doc/files/lib/Allocation_rb.html +1 -1
- data/doc/files/lib/AppConfig_rb.html +1 -1
- data/doc/files/lib/AttributeBase_rb.html +11 -1
- data/doc/files/lib/AttributeDefinition_rb.html +1 -1
- data/doc/files/lib/Attributes_rb.html +1 -1
- data/doc/files/lib/{LogicalFlag_rb.html → BatchProcessor_rb.html} +8 -6
- data/doc/files/lib/Booking_rb.html +1 -1
- data/doc/files/lib/ChargeSet_rb.html +1 -1
- data/doc/files/lib/Charge_rb.html +1 -1
- data/doc/files/lib/HTMLDocument_rb.html +1 -1
- data/doc/files/lib/Interval_rb.html +1 -1
- data/doc/files/lib/Journal_rb.html +106 -0
- data/doc/files/lib/KeywordArray_rb.html +106 -0
- data/doc/files/lib/KeywordDocumentation_rb.html +1 -1
- data/doc/files/lib/Limits_rb.html +1 -1
- data/doc/files/lib/Log_rb.html +1 -1
- data/doc/files/lib/LogicalExpression_rb.html +1 -3
- data/doc/files/lib/LogicalFunction_rb.html +1 -1
- data/doc/files/lib/LogicalOperation_rb.html +1 -1
- data/doc/files/lib/MacroParser_rb.html +1 -1
- data/doc/files/lib/MacroTable_rb.html +1 -1
- data/doc/files/lib/MessageHandler_rb.html +1 -1
- data/doc/files/lib/Message_rb.html +1 -1
- data/doc/files/lib/ProjectFileParser_rb.html +5 -1
- data/doc/files/lib/Project_rb.html +5 -1
- data/doc/files/lib/PropertyList_rb.html +1 -1
- data/doc/files/lib/PropertySet_rb.html +1 -1
- data/doc/files/lib/PropertyTreeNode_rb.html +1 -1
- data/doc/files/lib/Query_rb.html +1 -1
- data/doc/files/lib/RTPNavigator_rb.html +120 -0
- data/doc/files/lib/RTPReport_rb.html +118 -0
- data/doc/files/lib/RealFormat_rb.html +1 -1
- data/doc/files/lib/ResourceScenario_rb.html +1 -1
- data/doc/files/lib/Resource_rb.html +1 -1
- data/doc/files/lib/RichTextDocument_rb.html +1 -1
- data/doc/files/lib/RichTextElement_rb.html +1 -1
- data/doc/files/lib/RichTextParser_rb.html +1 -1
- data/doc/files/lib/RichTextProtocolExample_rb.html +1 -1
- data/doc/files/lib/RichTextProtocolHandler_rb.html +1 -1
- data/doc/files/lib/RichTextScanner_rb.html +1 -1
- data/doc/files/lib/RichTextSnip_rb.html +1 -1
- data/doc/files/lib/RichTextSyntaxRules_rb.html +1 -1
- data/doc/files/lib/RichText_rb.html +1 -1
- data/doc/files/lib/ScenarioData_rb.html +1 -1
- data/doc/files/lib/Scenario_rb.html +1 -1
- data/doc/files/lib/Scoreboard_rb.html +1 -1
- data/doc/files/lib/ShiftAssignments_rb.html +1 -1
- data/doc/files/lib/ShiftScenario_rb.html +1 -1
- data/doc/files/lib/Shift_rb.html +1 -1
- data/doc/files/lib/SourceFileInfo_rb.html +1 -1
- data/doc/files/lib/SyntaxReference_rb.html +1 -1
- data/doc/files/lib/TOCEntry_rb.html +1 -1
- data/doc/files/lib/TableColumnDefinition_rb.html +1 -1
- data/doc/files/lib/TableOfContents_rb.html +1 -1
- data/doc/files/lib/TaskDependency_rb.html +1 -1
- data/doc/files/lib/TaskJuggler_rb.html +1 -1
- data/doc/files/lib/TaskScenario_rb.html +1 -1
- data/doc/files/lib/Task_rb.html +1 -1
- data/doc/files/lib/TextParser/Pattern_rb.html +1 -1
- data/doc/files/lib/TextParser/Rule_rb.html +1 -1
- data/doc/files/lib/TextParser/StackElement_rb.html +1 -1
- data/doc/files/lib/TextParser/TokenDoc_rb.html +1 -1
- data/doc/files/lib/TextParser_rb.html +1 -1
- data/doc/files/lib/TextScanner_rb.html +1 -1
- data/doc/files/lib/Tj3Config_rb.html +1 -1
- data/doc/files/lib/TjException_rb.html +1 -1
- data/doc/files/lib/TjTime_rb.html +1 -1
- data/doc/files/lib/TjpExample_rb.html +1 -1
- data/doc/files/lib/TjpSyntaxRules_rb.html +1 -1
- data/doc/files/lib/UTF8String_rb.html +1 -1
- data/doc/files/lib/UserManual_rb.html +1 -1
- data/doc/files/lib/WorkingHours_rb.html +1 -1
- data/doc/files/lib/XMLDocument_rb.html +1 -1
- data/doc/files/lib/XMLElement_rb.html +1 -1
- data/doc/files/lib/deep_copy_rb.html +106 -0
- data/doc/files/lib/ms_test_rb.html +90 -0
- data/doc/files/lib/reports/CSVFile_rb.html +1 -1
- data/doc/files/lib/reports/ColumnTable_rb.html +1 -1
- data/doc/files/lib/reports/GanttChart_rb.html +1 -1
- data/doc/files/lib/reports/GanttContainer_rb.html +1 -1
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +1 -1
- data/doc/files/lib/reports/GanttHeader_rb.html +1 -1
- data/doc/files/lib/reports/GanttLine_rb.html +1 -1
- data/doc/files/lib/reports/GanttLoadStack_rb.html +1 -1
- data/doc/files/lib/reports/GanttMilestone_rb.html +1 -1
- data/doc/files/lib/reports/GanttRouter_rb.html +1 -1
- data/doc/files/lib/reports/GanttTaskBar_rb.html +1 -1
- data/doc/files/lib/reports/HTMLGraphics_rb.html +1 -1
- data/doc/files/lib/reports/{ReportElement_rb.html → Navigator_rb.html} +6 -8
- data/doc/files/lib/reports/ReportBase_rb.html +106 -0
- data/doc/files/lib/reports/ReportContext_rb.html +106 -0
- data/doc/files/lib/reports/ReportTableCell_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableColumn_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableLegend_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableLine_rb.html +1 -1
- data/doc/files/lib/reports/ReportTable_rb.html +1 -1
- data/doc/files/lib/reports/Report_rb.html +8 -2
- data/doc/files/lib/reports/ResourceListRE_rb.html +2 -2
- data/doc/files/lib/reports/{ReportTableElement_rb.html → TableReport_rb.html} +7 -5
- data/doc/files/lib/reports/TaskListRE_rb.html +2 -2
- data/doc/files/lib/reports/TextReport_rb.html +116 -0
- data/doc/files/lib/reports/TjpExportRE_rb.html +2 -2
- data/doc/files/lib/taskjuggler3_rb.html +61 -56
- data/doc/files/lib/tj3man_rb.html +1 -1
- data/doc/fr_class_index.html +41 -3
- data/doc/fr_file_index.html +21 -5
- data/doc/fr_method_index.html +1069 -959
- data/examples/ContactList.html +1467 -0
- data/examples/Deliveries.html +485 -0
- data/examples/Development.html +2525 -0
- data/examples/Overview.html +747 -0
- data/examples/Resource Graph.html +616 -0
- data/examples/tutorial.tjp +63 -67
- data/lib/AttributeBase.rb +27 -31
- data/lib/AttributeDefinition.rb +12 -7
- data/lib/Attributes.rb +134 -34
- data/lib/Interval.rb +2 -0
- data/lib/Journal.rb +44 -0
- data/lib/{LogicalFlag.rb → KeywordArray.rb} +5 -13
- data/lib/KeywordDocumentation.rb +84 -47
- data/lib/Limits.rb +7 -5
- data/lib/LogicalExpression.rb +1 -1
- data/lib/LogicalOperation.rb +33 -0
- data/lib/Project.rb +313 -99
- data/lib/ProjectFileParser.rb +88 -11
- data/lib/PropertyList.rb +2 -1
- data/lib/PropertySet.rb +13 -4
- data/lib/PropertyTreeNode.rb +34 -15
- data/lib/Query.rb +2 -1
- data/lib/RTPNavigator.rb +53 -0
- data/lib/RTPReport.rb +62 -0
- data/lib/RealFormat.rb +28 -10
- data/lib/RichTextElement.rb +18 -12
- data/lib/RichTextParser.rb +1 -0
- data/lib/RichTextProtocolExample.rb +8 -11
- data/lib/RichTextProtocolHandler.rb +11 -1
- data/lib/RichTextScanner.rb +308 -164
- data/lib/RichTextSyntaxRules.rb +24 -0
- data/lib/TableColumnDefinition.rb +5 -1
- data/lib/TaskJuggler.rb +3 -2
- data/lib/TaskScenario.rb +123 -31
- data/lib/TextParser.rb +14 -3
- data/lib/TextScanner.rb +210 -34
- data/lib/Tj3Config.rb +1 -1
- data/lib/TjTime.rb +15 -0
- data/lib/TjpExample.rb +1 -1
- data/lib/TjpSyntaxRules.rb +674 -473
- data/lib/WorkingHours.rb +1 -1
- data/lib/XMLElement.rb +11 -3
- data/lib/deep_copy.rb +72 -0
- data/lib/ms_test.rb +27 -0
- data/lib/reports/ColumnTable.rb +7 -5
- data/lib/reports/GanttChart.rb +60 -34
- data/lib/reports/GanttHeader.rb +1 -1
- data/lib/reports/GanttRouter.rb +7 -5
- data/lib/reports/Navigator.rb +72 -0
- data/lib/reports/Report.rb +58 -73
- data/lib/reports/ReportBase.rb +241 -0
- data/lib/reports/ReportContext.rb +41 -0
- data/lib/reports/ReportTable.rb +7 -2
- data/lib/reports/ReportTableCell.rb +3 -3
- data/lib/reports/ResourceListRE.rb +19 -26
- data/lib/reports/{ReportTableElement.rb → TableReport.rb} +297 -97
- data/lib/reports/TaskListRE.rb +16 -24
- data/lib/reports/TextReport.rb +87 -0
- data/lib/reports/TjpExportRE.rb +55 -50
- data/lib/taskjuggler3.rb +6 -1
- data/manual/Getting_Started +57 -6
- data/manual/How_To_Contribute +2 -4
- data/manual/Intro +2 -2
- data/manual/Reporting_Bugs +9 -2
- data/manual/Rich_Text_Attributes +41 -0
- data/manual/Tutorial +219 -173
- data/tasks/test.rake +3 -0
- data/test/TestSuite/CSV-Reports/celltext.tjp +2 -1
- data/test/TestSuite/CSV-Reports/resourcereport.tjp +2 -1
- data/test/TestSuite/CSV-Reports/resourcereport_with_tasks.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortByTree.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_duration.down.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_effort.up.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_plan.start.down.tjp +2 -1
- data/test/TestSuite/CSV-Reports/taskreport.tjp +2 -1
- data/test/TestSuite/CSV-Reports/taskreport_with_resources.tjp +2 -1
- data/test/TestSuite/HTML-Reports/depArrows.tjp +72 -0
- data/test/TestSuite/HTML-Reports/reference-export.html +187 -0
- data/test/TestSuite/HTML-Reports/reference.tjp +21 -0
- data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -1
- data/test/TestSuite/Scheduler/Correct/AutomaticMilestones.tjp +3 -3
- data/test/TestSuite/Scheduler/Correct/Booking.tjp +3 -3
- data/test/TestSuite/Scheduler/Correct/Container-2.tjp +37 -0
- data/test/TestSuite/Scheduler/Correct/Container.tjp +40 -0
- data/test/TestSuite/Scheduler/Correct/Depends.tjp +9 -14
- data/test/TestSuite/Scheduler/Correct/Duration.tjp +2 -1
- data/test/TestSuite/Scheduler/Correct/InheritStartEnd.tjp +20 -29
- data/test/TestSuite/Scheduler/Correct/Limits.tjp +11 -13
- data/test/TestSuite/Scheduler/Correct/Optimize-1.tjp +6 -5
- data/test/TestSuite/Scheduler/Correct/Optimize-2.tjp +10 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-3.tjp +9 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-4.tjp +9 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-5.tjp +13 -10
- data/test/TestSuite/Scheduler/Correct/Precedes.tjp +9 -14
- data/test/TestSuite/Scheduler/Correct/Shift.tjp +9 -8
- data/test/TestSuite/Scheduler/Correct/checks.tji +4 -0
- data/test/TestSuite/Scheduler/Errors/weak_end_dep.tjp +16 -0
- data/test/TestSuite/Scheduler/Errors/weak_start_dep.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Account.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/AutoID.tjp +21 -0
- data/test/TestSuite/Syntax/Correct/AutoMacros.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Caption.tjp +7 -6
- data/test/TestSuite/Syntax/Correct/Celltext.tjp +7 -4
- data/test/TestSuite/Syntax/Correct/Comments.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/CompletedWork.tji +11 -19
- data/test/TestSuite/Syntax/Correct/CriticalPath.tjp +4 -3
- data/test/TestSuite/Syntax/Correct/Export.tjp +3 -1
- data/test/TestSuite/Syntax/Correct/Flags.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/HtmlTaskReport.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Journal.tjp +18 -0
- data/test/TestSuite/Syntax/Correct/LoadUnits.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Period.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/RawHTML.tjp +4 -2
- data/test/TestSuite/Syntax/Correct/Reports.tjp +4 -2
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.tji +2 -0
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.tjp +23 -0
- data/test/TestSuite/Syntax/Correct/Responsible.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/Simple.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/String.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/TaskRoot.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +92 -70
- data/test/TestSuite/Syntax/Errors/bad_comment.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/bad_include.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/bad_time_zone.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/bad_timing_res.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/chargeset_master.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/container_attribute.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/cost_acct_no_top.tjp +3 -2
- data/test/TestSuite/Syntax/Errors/cost_rev_same.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/eof_in_istring1.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring2.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring3.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring4.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring5.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/include_recursion.tji +1 -0
- data/test/TestSuite/Syntax/Errors/include_recursion.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/junk_after_cut.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/navigator_exists.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/operand_unkn_flag.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/report_end.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/report_exists.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/report_start.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/rev_acct_no_top.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sort_direction.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sort_unknown_scen.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd1.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd2.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_wbs.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/too_large_timing_res.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/unknown_scenario_idx.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/unknown_task.tjp +1 -1
- data/test/all.rb +1 -16
- data/test/test_CSV-Reports.rb +8 -5
- data/test/test_Query.rb +2 -2
- data/test/test_RichText.rb +95 -0
- data/test/test_Scheduler.rb +8 -4
- data/test/test_Syntax.rb +8 -4
- data/test/test_deep_copy.rb +83 -0
- metadata +549 -487
- data/benchmarks/UTF-8-Strings.rb +0 -58
- data/doc/classes/TaskJuggler/ReportElement.html +0 -1070
- data/doc/classes/TaskJuggler/ReportTableElement.html +0 -644
- data/lib/reports/ReportElement.rb +0 -427
- data/test/TestSuite/Syntax/Correct/csvtest +0 -16
- data/test/TestSuite/Syntax/Errors/no_csv_suffix.tjp +0 -10
- data/test/TestSuite/Syntax/Errors/no_html_suffix.tjp +0 -10
- data/test/TestSuite/Syntax/Errors/report_redifinition.tjp +0 -10
data/lib/RichTextScanner.rb
CHANGED
|
@@ -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
|
-
#
|
|
43
|
-
#
|
|
44
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if @beginOfLine && @
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
#
|
|
123
|
-
# case
|
|
124
|
-
#
|
|
125
|
-
|
|
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
|
-
|
|
129
|
-
|
|
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
|
data/lib/RichTextSyntaxRules.rb
CHANGED
|
@@ -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, :
|
|
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')
|