taskjuggler 0.0.4 → 0.0.5
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/README +1 -1
- data/bin/tj3client +3 -0
- data/bin/tj3d +3 -0
- data/bin/tj3ts_receiver +3 -0
- data/bin/tj3ts_sender +3 -0
- data/bin/tj3ts_summary +3 -0
- data/data/css/tjmanual.css +14 -0
- data/data/css/tjreport.css +233 -21
- data/data/scripts/wz_tooltip.js +20 -20
- data/doc/AppConfig.html +1389 -0
- data/doc/Arguments.html +678 -0
- data/doc/COPYING.html +837 -0
- data/doc/Object.html +996 -0
- data/doc/README.html +523 -0
- data/doc/RuntimeConfig.html +762 -0
- data/doc/String.html +872 -0
- data/doc/TaskJuggler/Account.html +691 -0
- data/doc/TaskJuggler/AccountAttribute.html +707 -0
- data/doc/TaskJuggler/AccountScenario.html +650 -0
- data/doc/TaskJuggler/Allocation.html +898 -0
- data/doc/TaskJuggler/AllocationAttribute.html +737 -0
- data/doc/TaskJuggler/AttributeBase.html +1193 -0
- data/doc/TaskJuggler/AttributeDefinition.html +753 -0
- data/doc/TaskJuggler/BatchProcessor.html +1112 -0
- data/doc/TaskJuggler/Booking.html +797 -0
- data/doc/TaskJuggler/BookingListAttribute.html +709 -0
- data/doc/TaskJuggler/BooleanAttribute.html +707 -0
- data/doc/TaskJuggler/CSVFile.html +924 -0
- data/doc/TaskJuggler/CellSettingPattern.html +638 -0
- data/doc/TaskJuggler/CellSettingPatternList.html +687 -0
- data/doc/TaskJuggler/Charge.html +715 -0
- data/doc/TaskJuggler/ChargeListAttribute.html +671 -0
- data/doc/TaskJuggler/ChargeSet.html +887 -0
- data/doc/TaskJuggler/ChargeSetListAttribute.html +718 -0
- data/doc/TaskJuggler/ColumnListAttribute.html +673 -0
- data/doc/TaskJuggler/ColumnTable.html +701 -0
- data/doc/TaskJuggler/Daemon.html +728 -0
- data/doc/TaskJuggler/DateAttribute.html +675 -0
- data/doc/TaskJuggler/DefinitionListAttribute.html +593 -0
- data/doc/TaskJuggler/DependencyListAttribute.html +713 -0
- data/doc/TaskJuggler/DurationAttribute.html +707 -0
- data/doc/TaskJuggler/FixnumAttribute.html +629 -0
- data/doc/TaskJuggler/FlagListAttribute.html +709 -0
- data/doc/TaskJuggler/FloatAttribute.html +671 -0
- data/doc/TaskJuggler/FormatListAttribute.html +635 -0
- data/doc/TaskJuggler/GanttChart.html +1473 -0
- data/doc/TaskJuggler/GanttContainer.html +885 -0
- data/doc/TaskJuggler/GanttHeader.html +886 -0
- data/doc/TaskJuggler/GanttHeaderScaleItem.html +700 -0
- data/doc/TaskJuggler/GanttLine.html +1263 -0
- data/doc/TaskJuggler/GanttLoadStack.html +766 -0
- data/doc/TaskJuggler/GanttMilestone.html +865 -0
- data/doc/TaskJuggler/GanttRouter.html +1433 -0
- data/doc/TaskJuggler/GanttTaskBar.html +880 -0
- data/doc/TaskJuggler/HTMLDocument.html +719 -0
- data/doc/TaskJuggler/HTMLGraphics.html +775 -0
- data/doc/TaskJuggler/Interval.html +1016 -0
- data/doc/TaskJuggler/IntervalListAttribute.html +713 -0
- data/doc/TaskJuggler/JobInfo.html +881 -0
- data/doc/TaskJuggler/Journal.html +991 -0
- data/doc/TaskJuggler/JournalEntry.html +779 -0
- data/doc/TaskJuggler/JournalEntryList.html +952 -0
- data/doc/TaskJuggler/KeywordArray.html +628 -0
- data/doc/TaskJuggler/KeywordDocumentation.html +1662 -0
- data/doc/TaskJuggler/Limits/Limit.html +826 -0
- data/doc/TaskJuggler/Limits.html +966 -0
- data/doc/TaskJuggler/LimitsAttribute.html +707 -0
- data/doc/TaskJuggler/ListAttributeBase.html +641 -0
- data/doc/TaskJuggler/Log.html +1103 -0
- data/doc/TaskJuggler/LogFile.html +918 -0
- data/doc/TaskJuggler/LogicalAttribute.html +698 -0
- data/doc/TaskJuggler/LogicalExpression.html +739 -0
- data/doc/TaskJuggler/LogicalExpressionAttribute.html +629 -0
- data/doc/TaskJuggler/LogicalFlag.html +681 -0
- data/doc/TaskJuggler/LogicalFunction.html +1218 -0
- data/doc/TaskJuggler/LogicalOperation.html +1078 -0
- data/doc/TaskJuggler/Macro.html +646 -0
- data/doc/TaskJuggler/MacroParser.html +810 -0
- data/doc/TaskJuggler/MacroTable.html +810 -0
- data/doc/TaskJuggler/ManagerResponsibilities.html +674 -0
- data/doc/TaskJuggler/ManagerStatusRecord.html +678 -0
- data/doc/TaskJuggler/Message.html +757 -0
- data/doc/TaskJuggler/MessageHandler.html +679 -0
- data/doc/TaskJuggler/Navigator.html +867 -0
- data/doc/TaskJuggler/NavigatorElement.html +932 -0
- data/doc/TaskJuggler/NikuProject.html +662 -0
- data/doc/TaskJuggler/NikuReport.html +1316 -0
- data/doc/TaskJuggler/NikuResource.html +632 -0
- data/doc/TaskJuggler/OnShiftCache.html +864 -0
- data/doc/TaskJuggler/ProcessIntercom.html +847 -0
- data/doc/TaskJuggler/ProcessIntercomIface.html +664 -0
- data/doc/TaskJuggler/Project.html +3056 -0
- data/doc/TaskJuggler/ProjectBroker.html +1260 -0
- data/doc/TaskJuggler/ProjectBrokerIface.html +734 -0
- data/doc/TaskJuggler/ProjectFileParser.html +1951 -0
- data/doc/TaskJuggler/ProjectRecord.html +859 -0
- data/doc/TaskJuggler/ProjectServer.html +1092 -0
- data/doc/TaskJuggler/ProjectServerIface.html +768 -0
- data/doc/TaskJuggler/PropertyAttribute.html +629 -0
- data/doc/TaskJuggler/PropertyList.html +1336 -0
- data/doc/TaskJuggler/PropertySet.html +1785 -0
- data/doc/TaskJuggler/PropertyTreeNode.html +2482 -0
- data/doc/TaskJuggler/Query.html +1831 -0
- data/doc/TaskJuggler/RTFNavigator.html +729 -0
- data/doc/TaskJuggler/RTFQuery.html +1038 -0
- data/doc/TaskJuggler/RTFReport.html +740 -0
- data/doc/TaskJuggler/RealFormat.html +743 -0
- data/doc/TaskJuggler/RealFormatAttribute.html +593 -0
- data/doc/TaskJuggler/ReferenceAttribute.html +782 -0
- data/doc/TaskJuggler/Report.html +1255 -0
- data/doc/TaskJuggler/ReportBase.html +1198 -0
- data/doc/TaskJuggler/ReportContext.html +711 -0
- data/doc/TaskJuggler/ReportServer.html +988 -0
- data/doc/TaskJuggler/ReportServerIface.html +838 -0
- data/doc/TaskJuggler/ReportServerRecord.html +716 -0
- data/doc/TaskJuggler/ReportTable.html +1106 -0
- data/doc/TaskJuggler/ReportTableCell.html +1536 -0
- data/doc/TaskJuggler/ReportTableColumn.html +828 -0
- data/doc/TaskJuggler/ReportTableLegend.html +999 -0
- data/doc/TaskJuggler/ReportTableLine.html +1003 -0
- data/doc/TaskJuggler/Resource.html +938 -0
- data/doc/TaskJuggler/ResourceListAttribute.html +752 -0
- data/doc/TaskJuggler/ResourceListRE.html +674 -0
- data/doc/TaskJuggler/ResourceScenario.html +2457 -0
- data/doc/TaskJuggler/RichText.html +791 -0
- data/doc/TaskJuggler/RichTextAttribute.html +743 -0
- data/doc/TaskJuggler/RichTextDocument.html +972 -0
- data/doc/TaskJuggler/RichTextElement.html +1615 -0
- data/doc/TaskJuggler/RichTextException.html +667 -0
- data/doc/TaskJuggler/RichTextFunctionExample.html +737 -0
- data/doc/TaskJuggler/RichTextFunctionHandler.html +689 -0
- data/doc/TaskJuggler/RichTextImage.html +650 -0
- data/doc/TaskJuggler/RichTextIntermediate.html +1161 -0
- data/doc/TaskJuggler/RichTextParser.html +756 -0
- data/doc/TaskJuggler/RichTextScanner.html +2010 -0
- data/doc/TaskJuggler/RichTextSnip.html +942 -0
- data/doc/TaskJuggler/RichTextSyntaxRules.html +1722 -0
- data/doc/TaskJuggler/Scenario.html +594 -0
- data/doc/TaskJuggler/ScenarioData.html +815 -0
- data/doc/TaskJuggler/ScenarioListAttribute.html +671 -0
- data/doc/TaskJuggler/Scoreboard.html +1114 -0
- data/doc/TaskJuggler/SheetHandlerBase.html +1115 -0
- data/doc/TaskJuggler/SheetReceiver.html +1293 -0
- data/doc/TaskJuggler/SheetSender.html +1089 -0
- data/doc/TaskJuggler/Shift.html +689 -0
- data/doc/TaskJuggler/ShiftAssignment.html +950 -0
- data/doc/TaskJuggler/ShiftAssignments.html +1379 -0
- data/doc/TaskJuggler/ShiftAssignmentsAttribute.html +707 -0
- data/doc/TaskJuggler/ShiftScenario.html +720 -0
- data/doc/TaskJuggler/SortListAttribute.html +631 -0
- data/doc/TaskJuggler/SourceFileInfo.html +698 -0
- data/doc/TaskJuggler/StatusSheetReceiver.html +615 -0
- data/doc/TaskJuggler/StatusSheetReport.html +872 -0
- data/doc/TaskJuggler/StatusSheetSender.html +654 -0
- data/doc/TaskJuggler/StringAttribute.html +671 -0
- data/doc/TaskJuggler/SymbolAttribute.html +629 -0
- data/doc/TaskJuggler/SyntaxReference.html +1155 -0
- data/doc/TaskJuggler/TOCEntry.html +723 -0
- data/doc/TaskJuggler/TSResourceRecord.html +670 -0
- data/doc/TaskJuggler/TSTaskRecord.html +682 -0
- data/doc/TaskJuggler/TableColumnDefinition.html +830 -0
- data/doc/TaskJuggler/TableOfContents.html +692 -0
- data/doc/TaskJuggler/TableReport.html +2444 -0
- data/doc/TaskJuggler/Task.html +781 -0
- data/doc/TaskJuggler/TaskDependency.html +730 -0
- data/doc/TaskJuggler/TaskListAttribute.html +713 -0
- data/doc/TaskJuggler/TaskListRE.html +673 -0
- data/doc/TaskJuggler/TaskScenario.html +4380 -0
- data/doc/TaskJuggler/TextFormatter.html +911 -0
- data/doc/TaskJuggler/TextParser/Pattern.html +1482 -0
- data/doc/TaskJuggler/TextParser/Rule.html +1288 -0
- data/doc/TaskJuggler/TextParser/StackElement.html +726 -0
- data/doc/TaskJuggler/TextParser/TextParserResultArray.html +648 -0
- data/doc/TaskJuggler/TextParser/TokenDoc.html +680 -0
- data/doc/TaskJuggler/TextParser.html +1670 -0
- data/doc/TaskJuggler/TextReport.html +856 -0
- data/doc/TaskJuggler/TextScanner/BufferStreamHandle.html +831 -0
- data/doc/TaskJuggler/TextScanner/FileStreamHandle.html +832 -0
- data/doc/TaskJuggler/TextScanner/StreamHandle.html +737 -0
- data/doc/TaskJuggler/TextScanner.html +2430 -0
- data/doc/TaskJuggler/TimeSheet.html +1233 -0
- data/doc/TaskJuggler/TimeSheetReceiver.html +612 -0
- data/doc/TaskJuggler/TimeSheetRecord.html +1352 -0
- data/doc/TaskJuggler/TimeSheetReport.html +948 -0
- data/doc/TaskJuggler/TimeSheetSender.html +637 -0
- data/doc/TaskJuggler/TimeSheetSummary.html +865 -0
- data/doc/TaskJuggler/TimeSheets.html +674 -0
- data/doc/TaskJuggler/Tj3AppBase.html +782 -0
- data/doc/TaskJuggler/Tj3Client.html +1455 -0
- data/doc/TaskJuggler/Tj3Daemon.html +767 -0
- data/doc/TaskJuggler/Tj3SheetAppBase.html +696 -0
- data/doc/TaskJuggler/Tj3SsReceiver.html +682 -0
- data/doc/TaskJuggler/Tj3SsSender.html +708 -0
- data/doc/TaskJuggler/Tj3TsReceiver.html +681 -0
- data/doc/TaskJuggler/Tj3TsSender.html +702 -0
- data/doc/TaskJuggler/Tj3TsSummary.html +710 -0
- data/doc/TaskJuggler/TjException.html +630 -0
- data/doc/TaskJuggler/TjTime.html +2590 -0
- data/doc/TaskJuggler/TjpExample.html +835 -0
- data/doc/TaskJuggler/TjpExportRE.html +1581 -0
- data/doc/TaskJuggler/TjpSyntaxRules.html +13004 -0
- data/doc/TaskJuggler/UserManual.html +1145 -0
- data/doc/TaskJuggler/WorkingHours.html +1101 -0
- data/doc/TaskJuggler/WorkingHoursAttribute.html +694 -0
- data/doc/TaskJuggler/XMLBlob.html +645 -0
- data/doc/TaskJuggler/XMLComment.html +640 -0
- data/doc/TaskJuggler/XMLDocument.html +732 -0
- data/doc/TaskJuggler/XMLElement.html +900 -0
- data/doc/TaskJuggler/XMLNamedText.html +601 -0
- data/doc/TaskJuggler/XMLText.html +655 -0
- data/doc/TaskJuggler.html +2243 -0
- data/doc/index.html +3778 -17
- data/doc/lib/AccountScenario_rb.html +67 -0
- data/doc/lib/Account_rb.html +69 -0
- data/doc/lib/Allocation_rb.html +69 -0
- data/doc/lib/AppConfig_rb.html +69 -0
- data/doc/lib/AttributeBase_rb.html +67 -0
- data/doc/lib/AttributeDefinition_rb.html +65 -0
- data/doc/lib/Attributes_rb.html +81 -0
- data/doc/lib/BatchProcessor_rb.html +69 -0
- data/doc/lib/Booking_rb.html +65 -0
- data/doc/lib/ChargeSet_rb.html +67 -0
- data/doc/lib/Charge_rb.html +67 -0
- data/doc/lib/HTMLDocument_rb.html +67 -0
- data/doc/lib/Interval_rb.html +67 -0
- data/doc/lib/Journal_rb.html +65 -0
- data/doc/lib/KeywordArray_rb.html +65 -0
- data/doc/lib/KeywordDocumentation_rb.html +75 -0
- data/doc/lib/Limits_rb.html +67 -0
- data/doc/lib/LogFile_rb.html +67 -0
- data/doc/lib/Log_rb.html +69 -0
- data/doc/lib/LogicalExpression_rb.html +71 -0
- data/doc/lib/LogicalFunction_rb.html +67 -0
- data/doc/lib/LogicalOperation_rb.html +67 -0
- data/doc/lib/MacroParser_rb.html +69 -0
- data/doc/lib/MacroTable_rb.html +73 -0
- data/doc/lib/MessageHandler_rb.html +65 -0
- data/doc/lib/Message_rb.html +67 -0
- data/doc/lib/ProjectFileParser_rb.html +79 -0
- data/doc/lib/Project_rb.html +109 -0
- data/doc/lib/PropertyList_rb.html +65 -0
- data/doc/lib/PropertySet_rb.html +69 -0
- data/doc/lib/PropertyTreeNode_rb.html +65 -0
- data/doc/lib/Query_rb.html +67 -0
- data/doc/lib/RTFNavigator_rb.html +71 -0
- data/doc/lib/RTFQuery_rb.html +71 -0
- data/doc/lib/RTFReport_rb.html +69 -0
- data/doc/lib/RealFormat_rb.html +65 -0
- data/doc/lib/ResourceScenario_rb.html +67 -0
- data/doc/lib/Resource_rb.html +69 -0
- data/doc/lib/RichTextDocument_rb.html +71 -0
- data/doc/lib/RichTextElement_rb.html +73 -0
- data/doc/lib/RichTextFunctionExample_rb.html +71 -0
- data/doc/lib/RichTextFunctionHandler_rb.html +65 -0
- data/doc/lib/RichTextParser_rb.html +71 -0
- data/doc/lib/RichTextScanner_rb.html +67 -0
- data/doc/lib/RichTextSnip_rb.html +69 -0
- data/doc/lib/RichTextSyntaxRules_rb.html +65 -0
- data/doc/lib/RichText_rb.html +69 -0
- data/doc/lib/RuntimeConfig_rb.html +67 -0
- data/doc/lib/ScenarioData_rb.html +69 -0
- data/doc/lib/Scenario_rb.html +67 -0
- data/doc/lib/Scoreboard_rb.html +65 -0
- data/doc/lib/SheetHandlerBase_rb.html +69 -0
- data/doc/lib/SheetReceiver_rb.html +75 -0
- data/doc/lib/SheetSender_rb.html +73 -0
- data/doc/lib/ShiftAssignments_rb.html +67 -0
- data/doc/lib/ShiftScenario_rb.html +67 -0
- data/doc/lib/Shift_rb.html +69 -0
- data/doc/lib/SourceFileInfo_rb.html +65 -0
- data/doc/lib/StatusSheetReceiver_rb.html +67 -0
- data/doc/lib/StatusSheetSender_rb.html +67 -0
- data/doc/lib/SyntaxReference_rb.html +73 -0
- data/doc/lib/TOCEntry_rb.html +69 -0
- data/doc/lib/TableColumnDefinition_rb.html +65 -0
- data/doc/lib/TableOfContents_rb.html +69 -0
- data/doc/lib/TaskDependency_rb.html +65 -0
- data/doc/lib/TaskJuggler_rb.html +73 -0
- data/doc/lib/TaskScenario_rb.html +67 -0
- data/doc/lib/Task_rb.html +69 -0
- data/doc/lib/TextFormatter_rb.html +67 -0
- data/doc/lib/TextParser/Pattern_rb.html +67 -0
- data/doc/lib/TextParser/Rule_rb.html +65 -0
- data/doc/lib/TextParser/StackElement_rb.html +65 -0
- data/doc/lib/TextParser/TokenDoc_rb.html +65 -0
- data/doc/lib/TextParser_rb.html +75 -0
- data/doc/lib/TextScanner_rb.html +79 -0
- data/doc/lib/TimeSheetReceiver_rb.html +67 -0
- data/doc/lib/TimeSheetSender_rb.html +67 -0
- data/doc/lib/TimeSheetSummary_rb.html +67 -0
- data/doc/lib/TimeSheets_rb.html +65 -0
- data/doc/lib/Tj3AppBase_rb.html +77 -0
- data/doc/lib/Tj3Config_rb.html +69 -0
- data/doc/lib/Tj3SheetAppBase_rb.html +67 -0
- data/doc/lib/TjException_rb.html +65 -0
- data/doc/lib/TjTime_rb.html +69 -0
- data/doc/lib/TjpExample_rb.html +67 -0
- data/doc/lib/TjpSyntaxRules_rb.html +65 -0
- data/doc/lib/UTF8String_rb.html +65 -0
- data/doc/lib/UserManual_rb.html +77 -0
- data/doc/lib/WorkingHours_rb.html +67 -0
- data/doc/lib/XMLDocument_rb.html +67 -0
- data/doc/lib/XMLElement_rb.html +67 -0
- data/doc/lib/daemon/Daemon_rb.html +67 -0
- data/doc/lib/daemon/ProcessIntercom_rb.html +67 -0
- data/doc/lib/daemon/ProjectBroker_rb.html +79 -0
- data/doc/lib/daemon/ProjectServer_rb.html +83 -0
- data/doc/lib/daemon/ReportServer_rb.html +73 -0
- data/doc/lib/deep_copy_rb.html +65 -0
- data/doc/lib/reports/CSVFile_rb.html +67 -0
- data/doc/lib/reports/ColumnTable_rb.html +67 -0
- data/doc/lib/reports/GanttChart_rb.html +73 -0
- data/doc/lib/reports/GanttContainer_rb.html +67 -0
- data/doc/lib/reports/GanttHeaderScaleItem_rb.html +65 -0
- data/doc/lib/reports/GanttHeader_rb.html +67 -0
- data/doc/lib/reports/GanttLine_rb.html +77 -0
- data/doc/lib/reports/GanttLoadStack_rb.html +67 -0
- data/doc/lib/reports/GanttMilestone_rb.html +67 -0
- data/doc/lib/reports/GanttRouter_rb.html +65 -0
- data/doc/lib/reports/GanttTaskBar_rb.html +67 -0
- data/doc/lib/reports/HTMLGraphics_rb.html +65 -0
- data/doc/lib/reports/Navigator_rb.html +67 -0
- data/doc/lib/reports/NikuReport_rb.html +69 -0
- data/doc/lib/reports/ReportBase_rb.html +65 -0
- data/doc/lib/reports/ReportContext_rb.html +65 -0
- data/doc/lib/reports/ReportTableCell_rb.html +65 -0
- data/doc/lib/reports/ReportTableColumn_rb.html +65 -0
- data/doc/lib/reports/ReportTableLegend_rb.html +65 -0
- data/doc/lib/reports/ReportTableLine_rb.html +67 -0
- data/doc/lib/reports/ReportTable_rb.html +69 -0
- data/doc/lib/reports/Report_rb.html +91 -0
- data/doc/lib/reports/ResourceListRE_rb.html +73 -0
- data/doc/lib/reports/StatusSheetReport_rb.html +67 -0
- data/doc/lib/reports/TableReport_rb.html +75 -0
- data/doc/lib/reports/TaskListRE_rb.html +73 -0
- data/doc/lib/reports/TextReport_rb.html +67 -0
- data/doc/lib/reports/TimeSheetReport_rb.html +67 -0
- data/doc/lib/reports/TjpExportRE_rb.html +67 -0
- data/doc/lib/ruby-signal-bug_rb.html +54 -0
- data/doc/lib/taskjuggler3_rb.html +73 -0
- data/doc/lib/tj3client_rb.html +73 -0
- data/doc/lib/tj3d_rb.html +73 -0
- data/doc/lib/tj3man_rb.html +73 -0
- data/doc/lib/tj3ss_receiver_rb.html +69 -0
- data/doc/lib/tj3ss_sender_rb.html +69 -0
- data/doc/lib/tj3ts_receiver_rb.html +69 -0
- data/doc/lib/tj3ts_sender_rb.html +69 -0
- data/doc/lib/tj3ts_summary_rb.html +69 -0
- data/doc/rdoc.css +701 -0
- data/examples/tutorial.tjp +25 -6
- data/lib/Attributes.rb +6 -2
- data/lib/HTMLDocument.rb +18 -2
- data/lib/Journal.rb +47 -4
- data/lib/KeywordArray.rb +1 -1
- data/lib/KeywordDocumentation.rb +17 -77
- data/lib/Log.rb +3 -1
- data/lib/LogFile.rb +72 -0
- data/lib/LogicalExpression.rb +5 -10
- data/lib/LogicalFunction.rb +34 -18
- data/lib/LogicalOperation.rb +32 -18
- data/lib/Project.rb +85 -13
- data/lib/ProjectFileParser.rb +19 -6
- data/lib/PropertyList.rb +12 -2
- data/lib/PropertyTreeNode.rb +23 -9
- data/lib/Query.rb +51 -13
- data/lib/RTFReport.rb +2 -2
- data/lib/Resource.rb +157 -0
- data/lib/ResourceScenario.rb +215 -68
- data/lib/RichText.rb +15 -3
- data/lib/RichTextDocument.rb +2 -4
- data/lib/RichTextElement.rb +87 -25
- data/lib/RichTextScanner.rb +32 -5
- data/lib/RichTextSnip.rb +6 -4
- data/lib/RichTextSyntaxRules.rb +44 -8
- data/lib/RuntimeConfig.rb +93 -0
- data/lib/Scoreboard.rb +6 -6
- data/lib/SheetHandlerBase.rb +215 -0
- data/lib/SheetReceiver.rb +355 -0
- data/lib/SheetSender.rb +264 -0
- data/lib/ShiftAssignments.rb +35 -27
- data/lib/StatusSheetReceiver.rb +45 -0
- data/lib/StatusSheetSender.rb +54 -0
- data/lib/SyntaxReference.rb +2 -7
- data/lib/Task.rb +70 -0
- data/lib/TaskJuggler.rb +114 -12
- data/lib/TaskScenario.rb +131 -22
- data/lib/TextFormatter.rb +177 -0
- data/lib/TextParser.rb +10 -1
- data/lib/TextScanner.rb +63 -33
- data/lib/TimeSheetReceiver.rb +42 -0
- data/lib/TimeSheetSender.rb +55 -0
- data/lib/TimeSheetSummary.rb +149 -0
- data/lib/TimeSheets.rb +406 -0
- data/lib/Tj3AppBase.rb +114 -0
- data/lib/Tj3Config.rb +1 -1
- data/lib/Tj3SheetAppBase.rb +59 -0
- data/lib/TjTime.rb +14 -1
- data/lib/TjpSyntaxRules.rb +573 -211
- data/lib/UTF8String.rb +4 -0
- data/lib/UserManual.rb +8 -7
- data/lib/XMLElement.rb +27 -19
- data/lib/daemon/Daemon.rb +70 -0
- data/lib/daemon/ProcessIntercom.rb +117 -0
- data/lib/daemon/ProjectBroker.rb +450 -0
- data/lib/daemon/ProjectServer.rb +348 -0
- data/lib/daemon/ReportServer.rb +194 -0
- data/lib/reports/ColumnTable.rb +2 -0
- data/lib/reports/GanttChart.rb +5 -7
- data/lib/reports/GanttContainer.rb +5 -8
- data/lib/reports/GanttHeader.rb +1 -1
- data/lib/reports/GanttLine.rb +89 -53
- data/lib/reports/GanttMilestone.rb +7 -4
- data/lib/reports/GanttTaskBar.rb +7 -3
- data/lib/reports/HTMLGraphics.rb +24 -9
- data/lib/reports/NikuReport.rb +414 -0
- data/lib/reports/Report.rb +54 -20
- data/lib/reports/ReportBase.rb +21 -0
- data/lib/reports/ReportTable.rb +29 -11
- data/lib/reports/ReportTableCell.rb +154 -86
- data/lib/reports/ReportTableLegend.rb +77 -80
- data/lib/reports/ResourceListRE.rb +2 -3
- data/lib/reports/StatusSheetReport.rb +231 -0
- data/lib/reports/TableReport.rb +74 -65
- data/lib/reports/TaskListRE.rb +2 -4
- data/lib/reports/TextReport.rb +18 -12
- data/lib/reports/TimeSheetReport.rb +145 -80
- data/lib/reports/TjpExportRE.rb +4 -4
- data/lib/ruby-signal-bug.rb +43 -0
- data/lib/taskjuggler3.rb +27 -10
- data/lib/tj3client.rb +411 -77
- data/lib/tj3d.rb +110 -0
- data/lib/tj3ss_receiver.rb +56 -0
- data/lib/tj3ss_sender.rb +84 -0
- data/lib/tj3ts_receiver.rb +59 -0
- data/lib/tj3ts_sender.rb +78 -0
- data/lib/tj3ts_summary.rb +87 -0
- data/manual/Day_To_Day_Juggling +761 -32
- data/manual/Getting_Started +12 -12
- data/manual/Rich_Text_Attributes +13 -1
- data/manual/TaskJuggler_2x_Migration +41 -3
- data/manual/TaskJuggler_Internals +87 -0
- data/manual/The_TaskJuggler_Syntax +1 -2
- data/manual/Tutorial +10 -10
- data/test/TestSuite/CSV-Reports/celltext.tjp +1 -1
- data/test/TestSuite/HTML-Reports/TimeSheet.html +79 -0
- data/test/TestSuite/HTML-Reports/icons/trend-down.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/trend-flat.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/trend-up.png +0 -0
- data/test/TestSuite/HTML-Reports/reference.html +51 -0
- data/test/TestSuite/Scheduler/Correct/Booking2.html +603 -0
- data/test/TestSuite/Scheduler/Correct/Booking2.tjp +57 -0
- data/test/TestSuite/Scheduler/Correct/Duration.tjp +32 -18
- data/test/TestSuite/Scheduler/Correct/Manager.tjp +9 -0
- data/test/TestSuite/Scheduler/Correct/Shift.html +429 -0
- data/test/TestSuite/Scheduler/Correct/Shift2.html +162 -0
- data/test/TestSuite/Scheduler/Correct/Shift2.tjp +67 -0
- data/test/TestSuite/{Syntax/Correct/TimeSheet.tjp → Scheduler/Correct/TimeSheet2.tjp} +21 -8
- data/test/TestSuite/Scheduler/Correct/css/tjmanual.css +52 -0
- data/test/TestSuite/Scheduler/Correct/css/tjreport.css +195 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/details.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/resource.png +0 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/resourcegroup.png +0 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/task.png +0 -0
- data/test/TestSuite/{Syntax → Scheduler}/Correct/icons/taskgroup.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-down.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-flat.png +0 -0
- data/test/TestSuite/Scheduler/Correct/icons/trend-up.png +0 -0
- data/test/TestSuite/{HTML-Reports/scripts → Scheduler/Correct}/scripts/wz_tooltip.js +0 -0
- data/test/TestSuite/Scheduler/Errors/manager_is_group.tjp +15 -0
- data/test/TestSuite/Scheduler/Errors/manager_is_self.tjp +11 -0
- data/test/TestSuite/Scheduler/Errors/resource_fail_check.tjp +12 -0
- data/test/TestSuite/Scheduler/Errors/resource_warn_check.tjp +12 -0
- data/test/TestSuite/Scheduler/Errors/task_fail_check.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/task_warn_check.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/ts_alert1_more_details.tjp +20 -0
- data/test/TestSuite/Scheduler/Errors/ts_alert2_more_details.tjp +21 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_expected_end.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_headline1.tjp +27 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_rem_or_end.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_remaining.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_status_work.tjp +18 -0
- data/test/TestSuite/Scheduler/Errors/ts_no_work.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/ts_res_new_task.tjp +20 -0
- data/test/TestSuite/Scheduler/Errors/ts_work_too_high.tjp +27 -0
- data/test/TestSuite/Scheduler/Errors/ts_work_too_low.tjp +27 -0
- data/test/TestSuite/StatusSheets/boss.tji +45 -0
- data/test/TestSuite/StatusSheets/boss_mail +51 -0
- data/test/TestSuite/StatusSheets/dev2_mail +37 -0
- data/test/TestSuite/StatusSheets/project.tjp +275 -0
- data/test/TestSuite/StatusSheets/run +50 -0
- data/test/TestSuite/Syntax/Correct/Include.tjp +4 -0
- data/test/TestSuite/Syntax/Correct/Limits-1.tjp +10 -1
- data/test/TestSuite/Syntax/Correct/Manager.tjp +30 -0
- data/test/TestSuite/Syntax/Correct/Niku.tjp +66 -0
- data/test/TestSuite/Syntax/Correct/TimeSheet1.tjp +83 -0
- data/test/TestSuite/Syntax/Correct/include/dir1/file2.tji +1 -0
- data/test/TestSuite/Syntax/Correct/include/dir2/file3.tji +2 -0
- data/test/TestSuite/Syntax/Correct/include/file1.tji +3 -0
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +29 -8
- data/test/TestSuite/Syntax/Errors/ts_bad_priority.tjp +19 -0
- data/test/TestSuite/Syntax/Errors/ts_default_details.tjp +22 -0
- data/test/TestSuite/Syntax/Errors/ts_default_summary.tjp +22 -0
- data/test/TestSuite/Syntax/Errors/ts_duplicate_task.tjp +23 -0
- data/test/TestSuite/Syntax/Errors/ts_end_too_early.tjp +18 -0
- data/test/TestSuite/Syntax/Errors/ts_headline_too_long.tjp +19 -0
- data/test/TestSuite/Syntax/Errors/ts_no_headline2.tjp +27 -0
- data/test/TestSuite/Syntax/Errors/ts_summary_too_long.tjp +29 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/boss_2002-03-01.tji +36 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev1_2002-03-01.tji +48 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev2_2002-03-01.tji +67 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev3_2002-03-01.tji +67 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/doc_2002-03-01.tji +48 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/resources.yml +31 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/test_2002-03-01.tji +36 -0
- data/test/TestSuite/TimeSheets/TimeSheetTemplates/acceptable_intervals +1 -0
- data/test/TestSuite/TimeSheets/TimeSheets/2002-03-01/all.tji +1 -0
- data/test/TestSuite/TimeSheets/TimeSheets/2002-03-01/dev2_2002-03-01.tji +54 -0
- data/test/TestSuite/TimeSheets/TimeSheets/all.tji +2 -0
- data/test/TestSuite/TimeSheets/dev2_mail1 +84 -0
- data/test/TestSuite/TimeSheets/dev2_mail2 +87 -0
- data/test/TestSuite/TimeSheets/project.tjp +271 -0
- data/test/TestSuite/TimeSheets/receiver.log +102 -0
- data/test/TestSuite/TimeSheets/run +75 -0
- data/test/TestSuite/TimeSheets/sender.log +794 -0
- data/test/TestSuite/TimeSheets/summary.log +884 -0
- data/test/TestSuite/TimeSheets/timesheets.log +45 -0
- data/test/TestSuite/TimeSheets/tj3d.log +292 -0
- data/test/test_CSV-Reports.rb +5 -3
- data/test/test_RichText.rb +264 -56
- data/test/test_Scheduler.rb +1 -0
- data/test/test_TextFormatter.rb +142 -0
- data/test/test_TjTime.rb +15 -0
- metadata +816 -644
- data/benchmarks/UTF-8-Strings.rb +0 -58
- data/doc/classes/AppConfig.html +0 -880
- data/doc/classes/Arguments.html +0 -230
- data/doc/classes/Object.html +0 -229
- data/doc/classes/String.html +0 -399
- data/doc/classes/TaskJuggler/Account.html +0 -257
- data/doc/classes/TaskJuggler/AccountAttribute.html +0 -261
- data/doc/classes/TaskJuggler/AccountScenario.html +0 -218
- data/doc/classes/TaskJuggler/Allocation.html +0 -423
- data/doc/classes/TaskJuggler/AllocationAttribute.html +0 -291
- data/doc/classes/TaskJuggler/AttributeBase.html +0 -704
- data/doc/classes/TaskJuggler/AttributeDefinition.html +0 -276
- data/doc/classes/TaskJuggler/BatchProcessor.html +0 -347
- data/doc/classes/TaskJuggler/Booking.html +0 -311
- data/doc/classes/TaskJuggler/BookingListAttribute.html +0 -263
- data/doc/classes/TaskJuggler/BooleanAttribute.html +0 -261
- data/doc/classes/TaskJuggler/CSVFile.html +0 -329
- data/doc/classes/TaskJuggler/CellSettingPattern.html +0 -201
- data/doc/classes/TaskJuggler/CellSettingPatternList.html +0 -253
- data/doc/classes/TaskJuggler/Charge.html +0 -283
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +0 -229
- data/doc/classes/TaskJuggler/ChargeSet.html +0 -444
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +0 -276
- data/doc/classes/TaskJuggler/ColumnListAttribute.html +0 -231
- data/doc/classes/TaskJuggler/ColumnTable.html +0 -262
- data/doc/classes/TaskJuggler/DateAttribute.html +0 -233
- data/doc/classes/TaskJuggler/DefinitionListAttribute.html +0 -162
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +0 -267
- data/doc/classes/TaskJuggler/DurationAttribute.html +0 -229
- data/doc/classes/TaskJuggler/FixnumAttribute.html +0 -194
- data/doc/classes/TaskJuggler/FlagListAttribute.html +0 -263
- data/doc/classes/TaskJuggler/FloatAttribute.html +0 -229
- data/doc/classes/TaskJuggler/FormatListAttribute.html +0 -197
- data/doc/classes/TaskJuggler/GanttChart.html +0 -696
- data/doc/classes/TaskJuggler/GanttContainer.html +0 -445
- data/doc/classes/TaskJuggler/GanttHeader.html +0 -284
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +0 -249
- data/doc/classes/TaskJuggler/GanttLine.html +0 -402
- data/doc/classes/TaskJuggler/GanttLoadStack.html +0 -331
- data/doc/classes/TaskJuggler/GanttMilestone.html +0 -419
- data/doc/classes/TaskJuggler/GanttRouter.html +0 -431
- data/doc/classes/TaskJuggler/GanttTaskBar.html +0 -433
- data/doc/classes/TaskJuggler/HTMLDocument.html +0 -240
- data/doc/classes/TaskJuggler/HTMLGraphics.html +0 -231
- data/doc/classes/TaskJuggler/Interval.html +0 -558
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +0 -267
- data/doc/classes/TaskJuggler/JobInfo.html +0 -340
- data/doc/classes/TaskJuggler/Journal.html +0 -443
- data/doc/classes/TaskJuggler/JournalEntry.html +0 -274
- data/doc/classes/TaskJuggler/JournalEntryList.html +0 -454
- data/doc/classes/TaskJuggler/KeywordArray.html +0 -179
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +0 -846
- data/doc/classes/TaskJuggler/Limits/Limit.html +0 -385
- data/doc/classes/TaskJuggler/Limits.html +0 -422
- data/doc/classes/TaskJuggler/LimitsAttribute.html +0 -261
- data/doc/classes/TaskJuggler/ListAttributeBase.html +0 -207
- data/doc/classes/TaskJuggler/Log.html +0 -655
- data/doc/classes/TaskJuggler/LogicalAttribute.html +0 -259
- data/doc/classes/TaskJuggler/LogicalExpression.html +0 -292
- data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +0 -194
- data/doc/classes/TaskJuggler/LogicalFlag.html +0 -209
- data/doc/classes/TaskJuggler/LogicalFunction.html +0 -339
- data/doc/classes/TaskJuggler/LogicalOperation.html +0 -351
- data/doc/classes/TaskJuggler/Macro.html +0 -198
- data/doc/classes/TaskJuggler/MacroParser.html +0 -360
- data/doc/classes/TaskJuggler/MacroTable.html +0 -370
- data/doc/classes/TaskJuggler/Message.html +0 -285
- data/doc/classes/TaskJuggler/MessageHandler.html +0 -231
- data/doc/classes/TaskJuggler/Navigator.html +0 -313
- data/doc/classes/TaskJuggler/NavigatorElement.html +0 -449
- data/doc/classes/TaskJuggler/OnShiftCache.html +0 -316
- data/doc/classes/TaskJuggler/Project.html +0 -2257
- data/doc/classes/TaskJuggler/ProjectFileParser.html +0 -420
- data/doc/classes/TaskJuggler/PropertyAttribute.html +0 -194
- data/doc/classes/TaskJuggler/PropertyList.html +0 -668
- data/doc/classes/TaskJuggler/PropertySet.html +0 -1286
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +0 -1742
- data/doc/classes/TaskJuggler/Query.html +0 -870
- data/doc/classes/TaskJuggler/RTFNavigator.html +0 -293
- data/doc/classes/TaskJuggler/RTFQuery.html +0 -343
- data/doc/classes/TaskJuggler/RTFReport.html +0 -304
- data/doc/classes/TaskJuggler/RealFormat.html +0 -309
- data/doc/classes/TaskJuggler/RealFormatAttribute.html +0 -162
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +0 -328
- data/doc/classes/TaskJuggler/RemoteServiceManager.html +0 -335
- data/doc/classes/TaskJuggler/Report.html +0 -321
- data/doc/classes/TaskJuggler/ReportBase.html +0 -437
- data/doc/classes/TaskJuggler/ReportContext.html +0 -248
- data/doc/classes/TaskJuggler/ReportServer.html +0 -320
- data/doc/classes/TaskJuggler/ReportTable.html +0 -526
- data/doc/classes/TaskJuggler/ReportTableCell.html +0 -614
- data/doc/classes/TaskJuggler/ReportTableColumn.html +0 -368
- data/doc/classes/TaskJuggler/ReportTableLegend.html +0 -347
- data/doc/classes/TaskJuggler/ReportTableLine.html +0 -481
- data/doc/classes/TaskJuggler/Resource.html +0 -211
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +0 -302
- data/doc/classes/TaskJuggler/ResourceListRE.html +0 -245
- data/doc/classes/TaskJuggler/ResourceScenario.html +0 -1229
- data/doc/classes/TaskJuggler/RichText.html +0 -357
- data/doc/classes/TaskJuggler/RichTextAttribute.html +0 -293
- data/doc/classes/TaskJuggler/RichTextDocument.html +0 -424
- data/doc/classes/TaskJuggler/RichTextElement.html +0 -932
- data/doc/classes/TaskJuggler/RichTextException.html +0 -212
- data/doc/classes/TaskJuggler/RichTextFunctionExample.html +0 -301
- data/doc/classes/TaskJuggler/RichTextFunctionHandler.html +0 -245
- data/doc/classes/TaskJuggler/RichTextIntermediate.html +0 -563
- data/doc/classes/TaskJuggler/RichTextParser.html +0 -321
- data/doc/classes/TaskJuggler/RichTextScanner.html +0 -424
- data/doc/classes/TaskJuggler/RichTextSnip.html +0 -404
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +0 -1105
- data/doc/classes/TaskJuggler/Scenario.html +0 -163
- data/doc/classes/TaskJuggler/ScenarioData.html +0 -358
- data/doc/classes/TaskJuggler/ScenarioListAttribute.html +0 -229
- data/doc/classes/TaskJuggler/Scoreboard.html +0 -642
- data/doc/classes/TaskJuggler/Shift.html +0 -255
- data/doc/classes/TaskJuggler/ShiftAssignment.html +0 -492
- data/doc/classes/TaskJuggler/ShiftAssignments.html +0 -719
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +0 -261
- data/doc/classes/TaskJuggler/ShiftScenario.html +0 -282
- data/doc/classes/TaskJuggler/SortListAttribute.html +0 -196
- data/doc/classes/TaskJuggler/SourceFileInfo.html +0 -251
- data/doc/classes/TaskJuggler/StringAttribute.html +0 -229
- data/doc/classes/TaskJuggler/SymbolAttribute.html +0 -194
- data/doc/classes/TaskJuggler/SyntaxReference.html +0 -520
- data/doc/classes/TaskJuggler/TOCEntry.html +0 -246
- data/doc/classes/TaskJuggler/TSResourceRecord.html +0 -197
- data/doc/classes/TaskJuggler/TSTaskRecord.html +0 -215
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +0 -309
- data/doc/classes/TaskJuggler/TableOfContents.html +0 -260
- data/doc/classes/TaskJuggler/TableReport.html +0 -1015
- data/doc/classes/TaskJuggler/Task.html +0 -203
- data/doc/classes/TaskJuggler/TaskDependency.html +0 -255
- data/doc/classes/TaskJuggler/TaskListAttribute.html +0 -267
- data/doc/classes/TaskJuggler/TaskListRE.html +0 -245
- data/doc/classes/TaskJuggler/TaskScenario.html +0 -2543
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +0 -927
- data/doc/classes/TaskJuggler/TextParser/Rule.html +0 -783
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +0 -272
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +0 -212
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +0 -225
- data/doc/classes/TaskJuggler/TextParser.html +0 -754
- data/doc/classes/TaskJuggler/TextReport.html +0 -367
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +0 -355
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +0 -348
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +0 -264
- data/doc/classes/TaskJuggler/TextScanner.html +0 -815
- data/doc/classes/TaskJuggler/TimeSheetReport.html +0 -406
- data/doc/classes/TaskJuggler/TjException.html +0 -185
- data/doc/classes/TaskJuggler/TjTime.html +0 -1904
- data/doc/classes/TaskJuggler/TjpExample.html +0 -314
- data/doc/classes/TaskJuggler/TjpExportRE.html +0 -306
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +0 -10812
- data/doc/classes/TaskJuggler/UserManual.html +0 -605
- data/doc/classes/TaskJuggler/WorkingHours.html +0 -586
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +0 -252
- data/doc/classes/TaskJuggler/XMLBlob.html +0 -207
- data/doc/classes/TaskJuggler/XMLComment.html +0 -206
- data/doc/classes/TaskJuggler/XMLDocument.html +0 -298
- data/doc/classes/TaskJuggler/XMLElement.html +0 -389
- data/doc/classes/TaskJuggler/XMLNamedText.html +0 -174
- data/doc/classes/TaskJuggler/XMLText.html +0 -221
- data/doc/classes/TaskJuggler.html +0 -1573
- data/doc/files/COPYING.html +0 -448
- data/doc/files/README.html +0 -134
- data/doc/files/lib/AccountScenario_rb.html +0 -117
- data/doc/files/lib/Account_rb.html +0 -119
- data/doc/files/lib/Allocation_rb.html +0 -119
- data/doc/files/lib/AppConfig_rb.html +0 -119
- data/doc/files/lib/AttributeBase_rb.html +0 -117
- data/doc/files/lib/AttributeDefinition_rb.html +0 -107
- data/doc/files/lib/Attributes_rb.html +0 -131
- data/doc/files/lib/BatchProcessor_rb.html +0 -119
- data/doc/files/lib/Booking_rb.html +0 -107
- data/doc/files/lib/ChargeSet_rb.html +0 -117
- data/doc/files/lib/Charge_rb.html +0 -117
- data/doc/files/lib/HTMLDocument_rb.html +0 -117
- data/doc/files/lib/Interval_rb.html +0 -117
- data/doc/files/lib/Journal_rb.html +0 -107
- data/doc/files/lib/KeywordArray_rb.html +0 -107
- data/doc/files/lib/KeywordDocumentation_rb.html +0 -123
- data/doc/files/lib/Limits_rb.html +0 -117
- data/doc/files/lib/Log_rb.html +0 -117
- data/doc/files/lib/LogicalExpression_rb.html +0 -121
- data/doc/files/lib/LogicalFunction_rb.html +0 -117
- data/doc/files/lib/LogicalOperation_rb.html +0 -117
- data/doc/files/lib/MacroParser_rb.html +0 -119
- data/doc/files/lib/MacroTable_rb.html +0 -123
- data/doc/files/lib/MessageHandler_rb.html +0 -107
- data/doc/files/lib/Message_rb.html +0 -117
- data/doc/files/lib/ProjectFileParser_rb.html +0 -129
- data/doc/files/lib/Project_rb.html +0 -153
- data/doc/files/lib/PropertyList_rb.html +0 -107
- data/doc/files/lib/PropertySet_rb.html +0 -119
- data/doc/files/lib/PropertyTreeNode_rb.html +0 -107
- data/doc/files/lib/Query_rb.html +0 -117
- data/doc/files/lib/RTFNavigator_rb.html +0 -121
- data/doc/files/lib/RTFQuery_rb.html +0 -121
- data/doc/files/lib/RTFReport_rb.html +0 -119
- data/doc/files/lib/RealFormat_rb.html +0 -107
- data/doc/files/lib/RemoteServiceManager_rb.html +0 -117
- data/doc/files/lib/ReportServer_rb.html +0 -107
- data/doc/files/lib/ResourceScenario_rb.html +0 -117
- data/doc/files/lib/Resource_rb.html +0 -119
- data/doc/files/lib/RichTextDocument_rb.html +0 -121
- data/doc/files/lib/RichTextElement_rb.html +0 -121
- data/doc/files/lib/RichTextFunctionExample_rb.html +0 -121
- data/doc/files/lib/RichTextFunctionHandler_rb.html +0 -107
- data/doc/files/lib/RichTextParser_rb.html +0 -121
- data/doc/files/lib/RichTextScanner_rb.html +0 -117
- data/doc/files/lib/RichTextSnip_rb.html +0 -119
- data/doc/files/lib/RichTextSyntaxRules_rb.html +0 -107
- data/doc/files/lib/RichText_rb.html +0 -119
- data/doc/files/lib/ScenarioData_rb.html +0 -119
- data/doc/files/lib/Scenario_rb.html +0 -117
- data/doc/files/lib/Scoreboard_rb.html +0 -107
- data/doc/files/lib/ShiftAssignments_rb.html +0 -117
- data/doc/files/lib/ShiftScenario_rb.html +0 -117
- data/doc/files/lib/Shift_rb.html +0 -119
- data/doc/files/lib/SourceFileInfo_rb.html +0 -107
- data/doc/files/lib/SyntaxReference_rb.html +0 -123
- data/doc/files/lib/TOCEntry_rb.html +0 -119
- data/doc/files/lib/TableColumnDefinition_rb.html +0 -107
- data/doc/files/lib/TableOfContents_rb.html +0 -119
- data/doc/files/lib/TaskDependency_rb.html +0 -107
- data/doc/files/lib/TaskJuggler_rb.html +0 -125
- data/doc/files/lib/TaskScenario_rb.html +0 -117
- data/doc/files/lib/Task_rb.html +0 -119
- data/doc/files/lib/TextParser/Pattern_rb.html +0 -117
- data/doc/files/lib/TextParser/Rule_rb.html +0 -107
- data/doc/files/lib/TextParser/StackElement_rb.html +0 -107
- data/doc/files/lib/TextParser/TokenDoc_rb.html +0 -107
- data/doc/files/lib/TextParser_rb.html +0 -125
- data/doc/files/lib/TextScanner_rb.html +0 -129
- data/doc/files/lib/Tj3Config_rb.html +0 -119
- data/doc/files/lib/TjException_rb.html +0 -107
- data/doc/files/lib/TjTime_rb.html +0 -119
- data/doc/files/lib/TjpExample_rb.html +0 -117
- data/doc/files/lib/TjpSyntaxRules_rb.html +0 -107
- data/doc/files/lib/UTF8String_rb.html +0 -140
- data/doc/files/lib/UserManual_rb.html +0 -127
- data/doc/files/lib/WorkingHours_rb.html +0 -117
- data/doc/files/lib/XMLDocument_rb.html +0 -117
- data/doc/files/lib/XMLElement_rb.html +0 -117
- data/doc/files/lib/deep_copy_rb.html +0 -107
- data/doc/files/lib/reports/CSVFile_rb.html +0 -117
- data/doc/files/lib/reports/ColumnTable_rb.html +0 -117
- data/doc/files/lib/reports/GanttChart_rb.html +0 -123
- data/doc/files/lib/reports/GanttContainer_rb.html +0 -117
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +0 -107
- data/doc/files/lib/reports/GanttHeader_rb.html +0 -117
- data/doc/files/lib/reports/GanttLine_rb.html +0 -127
- data/doc/files/lib/reports/GanttLoadStack_rb.html +0 -117
- data/doc/files/lib/reports/GanttMilestone_rb.html +0 -117
- data/doc/files/lib/reports/GanttRouter_rb.html +0 -107
- data/doc/files/lib/reports/GanttTaskBar_rb.html +0 -117
- data/doc/files/lib/reports/HTMLGraphics_rb.html +0 -107
- data/doc/files/lib/reports/Navigator_rb.html +0 -117
- data/doc/files/lib/reports/ReportBase_rb.html +0 -107
- data/doc/files/lib/reports/ReportContext_rb.html +0 -107
- data/doc/files/lib/reports/ReportTableCell_rb.html +0 -107
- data/doc/files/lib/reports/ReportTableColumn_rb.html +0 -107
- data/doc/files/lib/reports/ReportTableLegend_rb.html +0 -107
- data/doc/files/lib/reports/ReportTableLine_rb.html +0 -117
- data/doc/files/lib/reports/ReportTable_rb.html +0 -119
- data/doc/files/lib/reports/Report_rb.html +0 -137
- data/doc/files/lib/reports/ResourceListRE_rb.html +0 -123
- data/doc/files/lib/reports/TableReport_rb.html +0 -125
- data/doc/files/lib/reports/TaskListRE_rb.html +0 -123
- data/doc/files/lib/reports/TextReport_rb.html +0 -117
- data/doc/files/lib/reports/TimeSheetReport_rb.html +0 -117
- data/doc/files/lib/reports/TjpExportRE_rb.html +0 -117
- data/doc/files/lib/taskjuggler3_rb.html +0 -298
- data/doc/files/lib/tj3client_rb.html +0 -280
- data/doc/files/lib/tj3man_rb.html +0 -190
- data/doc/fr_class_index.html +0 -345
- data/doc/fr_file_index.html +0 -247
- data/doc/fr_method_index.html +0 -2355
- data/doc/rdoc-style.css +0 -299
- data/lib/RemoteServiceManager.rb +0 -80
- data/lib/ReportServer.rb +0 -66
- data/test/TestSuite/HTML-Reports/Alerts.html +0 -172
- data/test/TestSuite/HTML-Reports/CellText.html +0 -758
- data/test/TestSuite/HTML-Reports/ColumnPeriods.html +0 -156
- data/test/TestSuite/HTML-Reports/IsOngoing.html +0 -172
- data/test/TestSuite/HTML-Reports/LogicalFunctions.html +0 -80
- data/test/TestSuite/HTML-Reports/Query.html +0 -31
- data/test/TestSuite/HTML-Reports/depArrows.html +0 -842
- data/test/TestSuite/Syntax/Correct/RawHTML.tjp +0 -31
- data/test/TestSuite/Syntax/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/Syntax/Correct/scripts/wz_tooltip.js +0 -1301
- data/test/TestSuite/Syntax/Errors/export_bad_extn.tjp +0 -9
@@ -0,0 +1,2010 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: TaskJuggler::RichTextScanner</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="../index.html">Home</a>
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="../lib/RichTextScanner_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/RichTextScanner.rb">lib/RichTextScanner.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link"><a href="../Object.html">Object</a></p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#M001465">::new</a></li>
|
73
|
+
|
74
|
+
<li><a href="#M001470">#error</a></li>
|
75
|
+
|
76
|
+
<li><a href="#M001469">#fileName</a></li>
|
77
|
+
|
78
|
+
<li><a href="#M001488">#isIdStart</a></li>
|
79
|
+
|
80
|
+
<li><a href="#M001480">#nextChar</a></li>
|
81
|
+
|
82
|
+
<li><a href="#M001466">#nextToken</a></li>
|
83
|
+
|
84
|
+
<li><a href="#M001471">#nextTokenFuncArg</a></li>
|
85
|
+
|
86
|
+
<li><a href="#M001473">#nextTokenHRef</a></li>
|
87
|
+
|
88
|
+
<li><a href="#M001477">#nextTokenNewline</a></li>
|
89
|
+
|
90
|
+
<li><a href="#M001476">#nextTokenNoWikiInline</a></li>
|
91
|
+
|
92
|
+
<li><a href="#M001478">#nextTokenOpenAngle</a></li>
|
93
|
+
|
94
|
+
<li><a href="#M001472">#nextTokenRef</a></li>
|
95
|
+
|
96
|
+
<li><a href="#M001474">#nextTokenWikiBOL</a></li>
|
97
|
+
|
98
|
+
<li><a href="#M001475">#nextTokenWikiInline</a></li>
|
99
|
+
|
100
|
+
<li><a href="#M001479">#nextTokenWord</a></li>
|
101
|
+
|
102
|
+
<li><a href="#M001482">#peek</a></li>
|
103
|
+
|
104
|
+
<li><a href="#M001483">#peekMatch</a></li>
|
105
|
+
|
106
|
+
<li><a href="#M001487">#readBlanks</a></li>
|
107
|
+
|
108
|
+
<li><a href="#M001486">#readCode</a></li>
|
109
|
+
|
110
|
+
<li><a href="#M001489">#readId</a></li>
|
111
|
+
|
112
|
+
<li><a href="#M001484">#readSequence</a></li>
|
113
|
+
|
114
|
+
<li><a href="#M001485">#readSequenceMax</a></li>
|
115
|
+
|
116
|
+
<li><a href="#M001490">#readString</a></li>
|
117
|
+
|
118
|
+
<li><a href="#M001481">#returnChar</a></li>
|
119
|
+
|
120
|
+
<li><a href="#M001467">#returnToken</a></li>
|
121
|
+
|
122
|
+
<li><a href="#M001468">#sourceFileInfo</a></li>
|
123
|
+
|
124
|
+
</ul>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
|
128
|
+
<!-- Included Modules -->
|
129
|
+
|
130
|
+
</div>
|
131
|
+
|
132
|
+
<div id="project-metadata">
|
133
|
+
|
134
|
+
|
135
|
+
<div id="fileindex-section" class="section project-section">
|
136
|
+
<h3 class="section-header">Files</h3>
|
137
|
+
<ul>
|
138
|
+
|
139
|
+
<li class="file"><a href="../COPYING.html">COPYING</a></li>
|
140
|
+
|
141
|
+
<li class="file"><a href="../README.html">README</a></li>
|
142
|
+
|
143
|
+
</ul>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
<div id="classindex-section" class="section project-section">
|
148
|
+
<h3 class="section-header">Class Index
|
149
|
+
<span class="search-toggle"><img src="../images/find.png"
|
150
|
+
height="16" width="16" alt="[+]"
|
151
|
+
title="show/hide quicksearch" /></span></h3>
|
152
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
153
|
+
<fieldset>
|
154
|
+
<legend>Quicksearch</legend>
|
155
|
+
<input type="text" name="quicksearch" value=""
|
156
|
+
class="quicksearch-field" />
|
157
|
+
</fieldset>
|
158
|
+
</form>
|
159
|
+
|
160
|
+
<ul class="link-list">
|
161
|
+
|
162
|
+
<li><a href="../TaskJuggler.html">TaskJuggler</a></li>
|
163
|
+
|
164
|
+
<li><a href="../TaskJuggler/Account.html">TaskJuggler::Account</a></li>
|
165
|
+
|
166
|
+
<li><a href="../TaskJuggler/AccountAttribute.html">TaskJuggler::AccountAttribute</a></li>
|
167
|
+
|
168
|
+
<li><a href="../TaskJuggler/AccountScenario.html">TaskJuggler::AccountScenario</a></li>
|
169
|
+
|
170
|
+
<li><a href="../TaskJuggler/Allocation.html">TaskJuggler::Allocation</a></li>
|
171
|
+
|
172
|
+
<li><a href="../TaskJuggler/AllocationAttribute.html">TaskJuggler::AllocationAttribute</a></li>
|
173
|
+
|
174
|
+
<li><a href="../TaskJuggler/AttributeBase.html">TaskJuggler::AttributeBase</a></li>
|
175
|
+
|
176
|
+
<li><a href="../TaskJuggler/AttributeDefinition.html">TaskJuggler::AttributeDefinition</a></li>
|
177
|
+
|
178
|
+
<li><a href="../TaskJuggler/BatchProcessor.html">TaskJuggler::BatchProcessor</a></li>
|
179
|
+
|
180
|
+
<li><a href="../TaskJuggler/Booking.html">TaskJuggler::Booking</a></li>
|
181
|
+
|
182
|
+
<li><a href="../TaskJuggler/BookingListAttribute.html">TaskJuggler::BookingListAttribute</a></li>
|
183
|
+
|
184
|
+
<li><a href="../TaskJuggler/BooleanAttribute.html">TaskJuggler::BooleanAttribute</a></li>
|
185
|
+
|
186
|
+
<li><a href="../TaskJuggler/CSVFile.html">TaskJuggler::CSVFile</a></li>
|
187
|
+
|
188
|
+
<li><a href="../TaskJuggler/CellSettingPattern.html">TaskJuggler::CellSettingPattern</a></li>
|
189
|
+
|
190
|
+
<li><a href="../TaskJuggler/CellSettingPatternList.html">TaskJuggler::CellSettingPatternList</a></li>
|
191
|
+
|
192
|
+
<li><a href="../TaskJuggler/Charge.html">TaskJuggler::Charge</a></li>
|
193
|
+
|
194
|
+
<li><a href="../TaskJuggler/ChargeListAttribute.html">TaskJuggler::ChargeListAttribute</a></li>
|
195
|
+
|
196
|
+
<li><a href="../TaskJuggler/ChargeSet.html">TaskJuggler::ChargeSet</a></li>
|
197
|
+
|
198
|
+
<li><a href="../TaskJuggler/ChargeSetListAttribute.html">TaskJuggler::ChargeSetListAttribute</a></li>
|
199
|
+
|
200
|
+
<li><a href="../TaskJuggler/ColumnListAttribute.html">TaskJuggler::ColumnListAttribute</a></li>
|
201
|
+
|
202
|
+
<li><a href="../TaskJuggler/ColumnTable.html">TaskJuggler::ColumnTable</a></li>
|
203
|
+
|
204
|
+
<li><a href="../TaskJuggler/Daemon.html">TaskJuggler::Daemon</a></li>
|
205
|
+
|
206
|
+
<li><a href="../TaskJuggler/DateAttribute.html">TaskJuggler::DateAttribute</a></li>
|
207
|
+
|
208
|
+
<li><a href="../TaskJuggler/DefinitionListAttribute.html">TaskJuggler::DefinitionListAttribute</a></li>
|
209
|
+
|
210
|
+
<li><a href="../TaskJuggler/DependencyListAttribute.html">TaskJuggler::DependencyListAttribute</a></li>
|
211
|
+
|
212
|
+
<li><a href="../TaskJuggler/DurationAttribute.html">TaskJuggler::DurationAttribute</a></li>
|
213
|
+
|
214
|
+
<li><a href="../TaskJuggler/FixnumAttribute.html">TaskJuggler::FixnumAttribute</a></li>
|
215
|
+
|
216
|
+
<li><a href="../TaskJuggler/FlagListAttribute.html">TaskJuggler::FlagListAttribute</a></li>
|
217
|
+
|
218
|
+
<li><a href="../TaskJuggler/FloatAttribute.html">TaskJuggler::FloatAttribute</a></li>
|
219
|
+
|
220
|
+
<li><a href="../TaskJuggler/FormatListAttribute.html">TaskJuggler::FormatListAttribute</a></li>
|
221
|
+
|
222
|
+
<li><a href="../TaskJuggler/GanttChart.html">TaskJuggler::GanttChart</a></li>
|
223
|
+
|
224
|
+
<li><a href="../TaskJuggler/GanttContainer.html">TaskJuggler::GanttContainer</a></li>
|
225
|
+
|
226
|
+
<li><a href="../TaskJuggler/GanttHeader.html">TaskJuggler::GanttHeader</a></li>
|
227
|
+
|
228
|
+
<li><a href="../TaskJuggler/GanttHeaderScaleItem.html">TaskJuggler::GanttHeaderScaleItem</a></li>
|
229
|
+
|
230
|
+
<li><a href="../TaskJuggler/GanttLine.html">TaskJuggler::GanttLine</a></li>
|
231
|
+
|
232
|
+
<li><a href="../TaskJuggler/GanttLoadStack.html">TaskJuggler::GanttLoadStack</a></li>
|
233
|
+
|
234
|
+
<li><a href="../TaskJuggler/GanttMilestone.html">TaskJuggler::GanttMilestone</a></li>
|
235
|
+
|
236
|
+
<li><a href="../TaskJuggler/GanttRouter.html">TaskJuggler::GanttRouter</a></li>
|
237
|
+
|
238
|
+
<li><a href="../TaskJuggler/GanttTaskBar.html">TaskJuggler::GanttTaskBar</a></li>
|
239
|
+
|
240
|
+
<li><a href="../TaskJuggler/HTMLDocument.html">TaskJuggler::HTMLDocument</a></li>
|
241
|
+
|
242
|
+
<li><a href="../TaskJuggler/HTMLGraphics.html">TaskJuggler::HTMLGraphics</a></li>
|
243
|
+
|
244
|
+
<li><a href="../TaskJuggler/Interval.html">TaskJuggler::Interval</a></li>
|
245
|
+
|
246
|
+
<li><a href="../TaskJuggler/IntervalListAttribute.html">TaskJuggler::IntervalListAttribute</a></li>
|
247
|
+
|
248
|
+
<li><a href="../TaskJuggler/JobInfo.html">TaskJuggler::JobInfo</a></li>
|
249
|
+
|
250
|
+
<li><a href="../TaskJuggler/Journal.html">TaskJuggler::Journal</a></li>
|
251
|
+
|
252
|
+
<li><a href="../TaskJuggler/JournalEntry.html">TaskJuggler::JournalEntry</a></li>
|
253
|
+
|
254
|
+
<li><a href="../TaskJuggler/JournalEntryList.html">TaskJuggler::JournalEntryList</a></li>
|
255
|
+
|
256
|
+
<li><a href="../TaskJuggler/KeywordArray.html">TaskJuggler::KeywordArray</a></li>
|
257
|
+
|
258
|
+
<li><a href="../TaskJuggler/KeywordDocumentation.html">TaskJuggler::KeywordDocumentation</a></li>
|
259
|
+
|
260
|
+
<li><a href="../TaskJuggler/Limits.html">TaskJuggler::Limits</a></li>
|
261
|
+
|
262
|
+
<li><a href="../TaskJuggler/Limits/Limit.html">TaskJuggler::Limits::Limit</a></li>
|
263
|
+
|
264
|
+
<li><a href="../TaskJuggler/LimitsAttribute.html">TaskJuggler::LimitsAttribute</a></li>
|
265
|
+
|
266
|
+
<li><a href="../TaskJuggler/ListAttributeBase.html">TaskJuggler::ListAttributeBase</a></li>
|
267
|
+
|
268
|
+
<li><a href="../TaskJuggler/Log.html">TaskJuggler::Log</a></li>
|
269
|
+
|
270
|
+
<li><a href="../TaskJuggler/LogFile.html">TaskJuggler::LogFile</a></li>
|
271
|
+
|
272
|
+
<li><a href="../TaskJuggler/LogicalAttribute.html">TaskJuggler::LogicalAttribute</a></li>
|
273
|
+
|
274
|
+
<li><a href="../TaskJuggler/LogicalExpression.html">TaskJuggler::LogicalExpression</a></li>
|
275
|
+
|
276
|
+
<li><a href="../TaskJuggler/LogicalExpressionAttribute.html">TaskJuggler::LogicalExpressionAttribute</a></li>
|
277
|
+
|
278
|
+
<li><a href="../TaskJuggler/LogicalFlag.html">TaskJuggler::LogicalFlag</a></li>
|
279
|
+
|
280
|
+
<li><a href="../TaskJuggler/LogicalFunction.html">TaskJuggler::LogicalFunction</a></li>
|
281
|
+
|
282
|
+
<li><a href="../TaskJuggler/LogicalOperation.html">TaskJuggler::LogicalOperation</a></li>
|
283
|
+
|
284
|
+
<li><a href="../TaskJuggler/Macro.html">TaskJuggler::Macro</a></li>
|
285
|
+
|
286
|
+
<li><a href="../TaskJuggler/MacroParser.html">TaskJuggler::MacroParser</a></li>
|
287
|
+
|
288
|
+
<li><a href="../TaskJuggler/MacroTable.html">TaskJuggler::MacroTable</a></li>
|
289
|
+
|
290
|
+
<li><a href="../TaskJuggler/ManagerResponsibilities.html">TaskJuggler::ManagerResponsibilities</a></li>
|
291
|
+
|
292
|
+
<li><a href="../TaskJuggler/ManagerStatusRecord.html">TaskJuggler::ManagerStatusRecord</a></li>
|
293
|
+
|
294
|
+
<li><a href="../TaskJuggler/Message.html">TaskJuggler::Message</a></li>
|
295
|
+
|
296
|
+
<li><a href="../TaskJuggler/MessageHandler.html">TaskJuggler::MessageHandler</a></li>
|
297
|
+
|
298
|
+
<li><a href="../TaskJuggler/Navigator.html">TaskJuggler::Navigator</a></li>
|
299
|
+
|
300
|
+
<li><a href="../TaskJuggler/NavigatorElement.html">TaskJuggler::NavigatorElement</a></li>
|
301
|
+
|
302
|
+
<li><a href="../TaskJuggler/NikuProject.html">TaskJuggler::NikuProject</a></li>
|
303
|
+
|
304
|
+
<li><a href="../TaskJuggler/NikuReport.html">TaskJuggler::NikuReport</a></li>
|
305
|
+
|
306
|
+
<li><a href="../TaskJuggler/NikuResource.html">TaskJuggler::NikuResource</a></li>
|
307
|
+
|
308
|
+
<li><a href="../TaskJuggler/OnShiftCache.html">TaskJuggler::OnShiftCache</a></li>
|
309
|
+
|
310
|
+
<li><a href="../TaskJuggler/ProcessIntercom.html">TaskJuggler::ProcessIntercom</a></li>
|
311
|
+
|
312
|
+
<li><a href="../TaskJuggler/ProcessIntercomIface.html">TaskJuggler::ProcessIntercomIface</a></li>
|
313
|
+
|
314
|
+
<li><a href="../TaskJuggler/Project.html">TaskJuggler::Project</a></li>
|
315
|
+
|
316
|
+
<li><a href="../TaskJuggler/ProjectBroker.html">TaskJuggler::ProjectBroker</a></li>
|
317
|
+
|
318
|
+
<li><a href="../TaskJuggler/ProjectBrokerIface.html">TaskJuggler::ProjectBrokerIface</a></li>
|
319
|
+
|
320
|
+
<li><a href="../TaskJuggler/ProjectFileParser.html">TaskJuggler::ProjectFileParser</a></li>
|
321
|
+
|
322
|
+
<li><a href="../TaskJuggler/ProjectRecord.html">TaskJuggler::ProjectRecord</a></li>
|
323
|
+
|
324
|
+
<li><a href="../TaskJuggler/ProjectServer.html">TaskJuggler::ProjectServer</a></li>
|
325
|
+
|
326
|
+
<li><a href="../TaskJuggler/ProjectServerIface.html">TaskJuggler::ProjectServerIface</a></li>
|
327
|
+
|
328
|
+
<li><a href="../TaskJuggler/PropertyAttribute.html">TaskJuggler::PropertyAttribute</a></li>
|
329
|
+
|
330
|
+
<li><a href="../TaskJuggler/PropertyList.html">TaskJuggler::PropertyList</a></li>
|
331
|
+
|
332
|
+
<li><a href="../TaskJuggler/PropertySet.html">TaskJuggler::PropertySet</a></li>
|
333
|
+
|
334
|
+
<li><a href="../TaskJuggler/PropertyTreeNode.html">TaskJuggler::PropertyTreeNode</a></li>
|
335
|
+
|
336
|
+
<li><a href="../TaskJuggler/Query.html">TaskJuggler::Query</a></li>
|
337
|
+
|
338
|
+
<li><a href="../TaskJuggler/RTFNavigator.html">TaskJuggler::RTFNavigator</a></li>
|
339
|
+
|
340
|
+
<li><a href="../TaskJuggler/RTFQuery.html">TaskJuggler::RTFQuery</a></li>
|
341
|
+
|
342
|
+
<li><a href="../TaskJuggler/RTFReport.html">TaskJuggler::RTFReport</a></li>
|
343
|
+
|
344
|
+
<li><a href="../TaskJuggler/RealFormat.html">TaskJuggler::RealFormat</a></li>
|
345
|
+
|
346
|
+
<li><a href="../TaskJuggler/RealFormatAttribute.html">TaskJuggler::RealFormatAttribute</a></li>
|
347
|
+
|
348
|
+
<li><a href="../TaskJuggler/ReferenceAttribute.html">TaskJuggler::ReferenceAttribute</a></li>
|
349
|
+
|
350
|
+
<li><a href="../TaskJuggler/Report.html">TaskJuggler::Report</a></li>
|
351
|
+
|
352
|
+
<li><a href="../TaskJuggler/ReportBase.html">TaskJuggler::ReportBase</a></li>
|
353
|
+
|
354
|
+
<li><a href="../TaskJuggler/ReportContext.html">TaskJuggler::ReportContext</a></li>
|
355
|
+
|
356
|
+
<li><a href="../TaskJuggler/ReportServer.html">TaskJuggler::ReportServer</a></li>
|
357
|
+
|
358
|
+
<li><a href="../TaskJuggler/ReportServerIface.html">TaskJuggler::ReportServerIface</a></li>
|
359
|
+
|
360
|
+
<li><a href="../TaskJuggler/ReportServerRecord.html">TaskJuggler::ReportServerRecord</a></li>
|
361
|
+
|
362
|
+
<li><a href="../TaskJuggler/ReportTable.html">TaskJuggler::ReportTable</a></li>
|
363
|
+
|
364
|
+
<li><a href="../TaskJuggler/ReportTableCell.html">TaskJuggler::ReportTableCell</a></li>
|
365
|
+
|
366
|
+
<li><a href="../TaskJuggler/ReportTableColumn.html">TaskJuggler::ReportTableColumn</a></li>
|
367
|
+
|
368
|
+
<li><a href="../TaskJuggler/ReportTableLegend.html">TaskJuggler::ReportTableLegend</a></li>
|
369
|
+
|
370
|
+
<li><a href="../TaskJuggler/ReportTableLine.html">TaskJuggler::ReportTableLine</a></li>
|
371
|
+
|
372
|
+
<li><a href="../TaskJuggler/Resource.html">TaskJuggler::Resource</a></li>
|
373
|
+
|
374
|
+
<li><a href="../TaskJuggler/ResourceListAttribute.html">TaskJuggler::ResourceListAttribute</a></li>
|
375
|
+
|
376
|
+
<li><a href="../TaskJuggler/ResourceListRE.html">TaskJuggler::ResourceListRE</a></li>
|
377
|
+
|
378
|
+
<li><a href="../TaskJuggler/ResourceScenario.html">TaskJuggler::ResourceScenario</a></li>
|
379
|
+
|
380
|
+
<li><a href="../TaskJuggler/RichText.html">TaskJuggler::RichText</a></li>
|
381
|
+
|
382
|
+
<li><a href="../TaskJuggler/RichTextAttribute.html">TaskJuggler::RichTextAttribute</a></li>
|
383
|
+
|
384
|
+
<li><a href="../TaskJuggler/RichTextDocument.html">TaskJuggler::RichTextDocument</a></li>
|
385
|
+
|
386
|
+
<li><a href="../TaskJuggler/RichTextElement.html">TaskJuggler::RichTextElement</a></li>
|
387
|
+
|
388
|
+
<li><a href="../TaskJuggler/RichTextException.html">TaskJuggler::RichTextException</a></li>
|
389
|
+
|
390
|
+
<li><a href="../TaskJuggler/RichTextFunctionExample.html">TaskJuggler::RichTextFunctionExample</a></li>
|
391
|
+
|
392
|
+
<li><a href="../TaskJuggler/RichTextFunctionHandler.html">TaskJuggler::RichTextFunctionHandler</a></li>
|
393
|
+
|
394
|
+
<li><a href="../TaskJuggler/RichTextImage.html">TaskJuggler::RichTextImage</a></li>
|
395
|
+
|
396
|
+
<li><a href="../TaskJuggler/RichTextIntermediate.html">TaskJuggler::RichTextIntermediate</a></li>
|
397
|
+
|
398
|
+
<li><a href="../TaskJuggler/RichTextParser.html">TaskJuggler::RichTextParser</a></li>
|
399
|
+
|
400
|
+
<li><a href="../TaskJuggler/RichTextScanner.html">TaskJuggler::RichTextScanner</a></li>
|
401
|
+
|
402
|
+
<li><a href="../TaskJuggler/RichTextSnip.html">TaskJuggler::RichTextSnip</a></li>
|
403
|
+
|
404
|
+
<li><a href="../TaskJuggler/RichTextSyntaxRules.html">TaskJuggler::RichTextSyntaxRules</a></li>
|
405
|
+
|
406
|
+
<li><a href="../TaskJuggler/Scenario.html">TaskJuggler::Scenario</a></li>
|
407
|
+
|
408
|
+
<li><a href="../TaskJuggler/ScenarioData.html">TaskJuggler::ScenarioData</a></li>
|
409
|
+
|
410
|
+
<li><a href="../TaskJuggler/ScenarioListAttribute.html">TaskJuggler::ScenarioListAttribute</a></li>
|
411
|
+
|
412
|
+
<li><a href="../TaskJuggler/Scoreboard.html">TaskJuggler::Scoreboard</a></li>
|
413
|
+
|
414
|
+
<li><a href="../TaskJuggler/SheetHandlerBase.html">TaskJuggler::SheetHandlerBase</a></li>
|
415
|
+
|
416
|
+
<li><a href="../TaskJuggler/SheetReceiver.html">TaskJuggler::SheetReceiver</a></li>
|
417
|
+
|
418
|
+
<li><a href="../TaskJuggler/SheetSender.html">TaskJuggler::SheetSender</a></li>
|
419
|
+
|
420
|
+
<li><a href="../TaskJuggler/Shift.html">TaskJuggler::Shift</a></li>
|
421
|
+
|
422
|
+
<li><a href="../TaskJuggler/ShiftAssignment.html">TaskJuggler::ShiftAssignment</a></li>
|
423
|
+
|
424
|
+
<li><a href="../TaskJuggler/ShiftAssignments.html">TaskJuggler::ShiftAssignments</a></li>
|
425
|
+
|
426
|
+
<li><a href="../TaskJuggler/ShiftAssignmentsAttribute.html">TaskJuggler::ShiftAssignmentsAttribute</a></li>
|
427
|
+
|
428
|
+
<li><a href="../TaskJuggler/ShiftScenario.html">TaskJuggler::ShiftScenario</a></li>
|
429
|
+
|
430
|
+
<li><a href="../TaskJuggler/SortListAttribute.html">TaskJuggler::SortListAttribute</a></li>
|
431
|
+
|
432
|
+
<li><a href="../TaskJuggler/SourceFileInfo.html">TaskJuggler::SourceFileInfo</a></li>
|
433
|
+
|
434
|
+
<li><a href="../TaskJuggler/StatusSheetReceiver.html">TaskJuggler::StatusSheetReceiver</a></li>
|
435
|
+
|
436
|
+
<li><a href="../TaskJuggler/StatusSheetReport.html">TaskJuggler::StatusSheetReport</a></li>
|
437
|
+
|
438
|
+
<li><a href="../TaskJuggler/StatusSheetSender.html">TaskJuggler::StatusSheetSender</a></li>
|
439
|
+
|
440
|
+
<li><a href="../TaskJuggler/StringAttribute.html">TaskJuggler::StringAttribute</a></li>
|
441
|
+
|
442
|
+
<li><a href="../TaskJuggler/SymbolAttribute.html">TaskJuggler::SymbolAttribute</a></li>
|
443
|
+
|
444
|
+
<li><a href="../TaskJuggler/SyntaxReference.html">TaskJuggler::SyntaxReference</a></li>
|
445
|
+
|
446
|
+
<li><a href="../TaskJuggler/TOCEntry.html">TaskJuggler::TOCEntry</a></li>
|
447
|
+
|
448
|
+
<li><a href="../TaskJuggler/TSResourceRecord.html">TaskJuggler::TSResourceRecord</a></li>
|
449
|
+
|
450
|
+
<li><a href="../TaskJuggler/TSTaskRecord.html">TaskJuggler::TSTaskRecord</a></li>
|
451
|
+
|
452
|
+
<li><a href="../TaskJuggler/TableColumnDefinition.html">TaskJuggler::TableColumnDefinition</a></li>
|
453
|
+
|
454
|
+
<li><a href="../TaskJuggler/TableOfContents.html">TaskJuggler::TableOfContents</a></li>
|
455
|
+
|
456
|
+
<li><a href="../TaskJuggler/TableReport.html">TaskJuggler::TableReport</a></li>
|
457
|
+
|
458
|
+
<li><a href="../TaskJuggler/Task.html">TaskJuggler::Task</a></li>
|
459
|
+
|
460
|
+
<li><a href="../TaskJuggler/TaskDependency.html">TaskJuggler::TaskDependency</a></li>
|
461
|
+
|
462
|
+
<li><a href="../TaskJuggler/TaskListAttribute.html">TaskJuggler::TaskListAttribute</a></li>
|
463
|
+
|
464
|
+
<li><a href="../TaskJuggler/TaskListRE.html">TaskJuggler::TaskListRE</a></li>
|
465
|
+
|
466
|
+
<li><a href="../TaskJuggler/TaskScenario.html">TaskJuggler::TaskScenario</a></li>
|
467
|
+
|
468
|
+
<li><a href="../TaskJuggler/TextFormatter.html">TaskJuggler::TextFormatter</a></li>
|
469
|
+
|
470
|
+
<li><a href="../TaskJuggler/TextParser.html">TaskJuggler::TextParser</a></li>
|
471
|
+
|
472
|
+
<li><a href="../TaskJuggler/TextParser/Pattern.html">TaskJuggler::TextParser::Pattern</a></li>
|
473
|
+
|
474
|
+
<li><a href="../TaskJuggler/TextParser/Rule.html">TaskJuggler::TextParser::Rule</a></li>
|
475
|
+
|
476
|
+
<li><a href="../TaskJuggler/TextParser/StackElement.html">TaskJuggler::TextParser::StackElement</a></li>
|
477
|
+
|
478
|
+
<li><a href="../TaskJuggler/TextParser/TextParserResultArray.html">TaskJuggler::TextParser::TextParserResultArray</a></li>
|
479
|
+
|
480
|
+
<li><a href="../TaskJuggler/TextParser/TokenDoc.html">TaskJuggler::TextParser::TokenDoc</a></li>
|
481
|
+
|
482
|
+
<li><a href="../TaskJuggler/TextReport.html">TaskJuggler::TextReport</a></li>
|
483
|
+
|
484
|
+
<li><a href="../TaskJuggler/TextScanner.html">TaskJuggler::TextScanner</a></li>
|
485
|
+
|
486
|
+
<li><a href="../TaskJuggler/TextScanner/BufferStreamHandle.html">TaskJuggler::TextScanner::BufferStreamHandle</a></li>
|
487
|
+
|
488
|
+
<li><a href="../TaskJuggler/TextScanner/FileStreamHandle.html">TaskJuggler::TextScanner::FileStreamHandle</a></li>
|
489
|
+
|
490
|
+
<li><a href="../TaskJuggler/TextScanner/StreamHandle.html">TaskJuggler::TextScanner::StreamHandle</a></li>
|
491
|
+
|
492
|
+
<li><a href="../TaskJuggler/TimeSheet.html">TaskJuggler::TimeSheet</a></li>
|
493
|
+
|
494
|
+
<li><a href="../TaskJuggler/TimeSheetReceiver.html">TaskJuggler::TimeSheetReceiver</a></li>
|
495
|
+
|
496
|
+
<li><a href="../TaskJuggler/TimeSheetRecord.html">TaskJuggler::TimeSheetRecord</a></li>
|
497
|
+
|
498
|
+
<li><a href="../TaskJuggler/TimeSheetReport.html">TaskJuggler::TimeSheetReport</a></li>
|
499
|
+
|
500
|
+
<li><a href="../TaskJuggler/TimeSheetSender.html">TaskJuggler::TimeSheetSender</a></li>
|
501
|
+
|
502
|
+
<li><a href="../TaskJuggler/TimeSheetSummary.html">TaskJuggler::TimeSheetSummary</a></li>
|
503
|
+
|
504
|
+
<li><a href="../TaskJuggler/TimeSheets.html">TaskJuggler::TimeSheets</a></li>
|
505
|
+
|
506
|
+
<li><a href="../TaskJuggler/Tj3AppBase.html">TaskJuggler::Tj3AppBase</a></li>
|
507
|
+
|
508
|
+
<li><a href="../TaskJuggler/Tj3Client.html">TaskJuggler::Tj3Client</a></li>
|
509
|
+
|
510
|
+
<li><a href="../TaskJuggler/Tj3Daemon.html">TaskJuggler::Tj3Daemon</a></li>
|
511
|
+
|
512
|
+
<li><a href="../TaskJuggler/Tj3SheetAppBase.html">TaskJuggler::Tj3SheetAppBase</a></li>
|
513
|
+
|
514
|
+
<li><a href="../TaskJuggler/Tj3SsReceiver.html">TaskJuggler::Tj3SsReceiver</a></li>
|
515
|
+
|
516
|
+
<li><a href="../TaskJuggler/Tj3SsSender.html">TaskJuggler::Tj3SsSender</a></li>
|
517
|
+
|
518
|
+
<li><a href="../TaskJuggler/Tj3TsReceiver.html">TaskJuggler::Tj3TsReceiver</a></li>
|
519
|
+
|
520
|
+
<li><a href="../TaskJuggler/Tj3TsSender.html">TaskJuggler::Tj3TsSender</a></li>
|
521
|
+
|
522
|
+
<li><a href="../TaskJuggler/Tj3TsSummary.html">TaskJuggler::Tj3TsSummary</a></li>
|
523
|
+
|
524
|
+
<li><a href="../TaskJuggler/TjException.html">TaskJuggler::TjException</a></li>
|
525
|
+
|
526
|
+
<li><a href="../TaskJuggler/TjTime.html">TaskJuggler::TjTime</a></li>
|
527
|
+
|
528
|
+
<li><a href="../TaskJuggler/TjpExample.html">TaskJuggler::TjpExample</a></li>
|
529
|
+
|
530
|
+
<li><a href="../TaskJuggler/TjpExportRE.html">TaskJuggler::TjpExportRE</a></li>
|
531
|
+
|
532
|
+
<li><a href="../TaskJuggler/TjpSyntaxRules.html">TaskJuggler::TjpSyntaxRules</a></li>
|
533
|
+
|
534
|
+
<li><a href="../TaskJuggler/UserManual.html">TaskJuggler::UserManual</a></li>
|
535
|
+
|
536
|
+
<li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li>
|
537
|
+
|
538
|
+
<li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li>
|
539
|
+
|
540
|
+
<li><a href="../TaskJuggler/XMLBlob.html">TaskJuggler::XMLBlob</a></li>
|
541
|
+
|
542
|
+
<li><a href="../TaskJuggler/XMLComment.html">TaskJuggler::XMLComment</a></li>
|
543
|
+
|
544
|
+
<li><a href="../TaskJuggler/XMLDocument.html">TaskJuggler::XMLDocument</a></li>
|
545
|
+
|
546
|
+
<li><a href="../TaskJuggler/XMLElement.html">TaskJuggler::XMLElement</a></li>
|
547
|
+
|
548
|
+
<li><a href="../TaskJuggler/XMLNamedText.html">TaskJuggler::XMLNamedText</a></li>
|
549
|
+
|
550
|
+
<li><a href="../TaskJuggler/XMLText.html">TaskJuggler::XMLText</a></li>
|
551
|
+
|
552
|
+
<li><a href="../AppConfig.html">AppConfig</a></li>
|
553
|
+
|
554
|
+
<li><a href="../Arguments.html">Arguments</a></li>
|
555
|
+
|
556
|
+
<li><a href="../Object.html">Object</a></li>
|
557
|
+
|
558
|
+
<li><a href="../RuntimeConfig.html">RuntimeConfig</a></li>
|
559
|
+
|
560
|
+
<li><a href="../String.html">String</a></li>
|
561
|
+
|
562
|
+
</ul>
|
563
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
564
|
+
</div>
|
565
|
+
|
566
|
+
|
567
|
+
</div>
|
568
|
+
</div>
|
569
|
+
|
570
|
+
<div id="documentation">
|
571
|
+
<h1 class="class">TaskJuggler::RichTextScanner</h1>
|
572
|
+
|
573
|
+
<div id="description">
|
574
|
+
<p>
|
575
|
+
The <a href="RichTextScanner.html">RichTextScanner</a> is used by the <a
|
576
|
+
href="RichTextParser.html">RichTextParser</a> to chop the input text into
|
577
|
+
digestable tokens. The parser and the scanner only communicate over <a
|
578
|
+
href="RichTextScanner.html#M001466">RichTextScanner#nextToken</a> and <a
|
579
|
+
href="RichTextScanner.html#M001467">RichTextScanner#returnToken</a>. The
|
580
|
+
scanner can break the text into words and special tokens.
|
581
|
+
</p>
|
582
|
+
|
583
|
+
</div>
|
584
|
+
|
585
|
+
<!-- Constants -->
|
586
|
+
|
587
|
+
|
588
|
+
<!-- Attributes -->
|
589
|
+
|
590
|
+
|
591
|
+
<!-- Methods -->
|
592
|
+
|
593
|
+
<div id="public-class-method-details" class="method-section section">
|
594
|
+
<h3 class="section-header">Public Class Methods</h3>
|
595
|
+
|
596
|
+
|
597
|
+
<div id="new-method" class="method-detail ">
|
598
|
+
<a name="M001465"></a>
|
599
|
+
|
600
|
+
<div class="method-heading">
|
601
|
+
|
602
|
+
<span class="method-name">new</span><span
|
603
|
+
class="method-args">(text)</span>
|
604
|
+
<span class="method-click-advice">click to toggle source</span>
|
605
|
+
|
606
|
+
</div>
|
607
|
+
|
608
|
+
<div class="method-description">
|
609
|
+
|
610
|
+
<p>
|
611
|
+
Create the <a href="RichTextScanner.html">RichTextScanner</a> object and
|
612
|
+
initialize all state variables.
|
613
|
+
</p>
|
614
|
+
|
615
|
+
|
616
|
+
|
617
|
+
<div class="method-source-code"
|
618
|
+
id="new-source">
|
619
|
+
<pre>
|
620
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 24</span>
|
621
|
+
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">text</span>)
|
622
|
+
25: <span class="ruby-comment cmt"># The token buffer is used to hold a returned token. Only one token can</span>
|
623
|
+
26: <span class="ruby-comment cmt"># be returned at a time.</span>
|
624
|
+
27: <span class="ruby-ivar">@tokenBuffer</span> = <span class="ruby-keyword kw">nil</span>
|
625
|
+
28: <span class="ruby-comment cmt"># A reference to the input text.</span>
|
626
|
+
29: <span class="ruby-ivar">@text</span> = <span class="ruby-identifier">text</span>
|
627
|
+
30: <span class="ruby-comment cmt"># The reference text should not change during processing. So we can</span>
|
628
|
+
31: <span class="ruby-comment cmt"># determine the length upfront. It's frequently used.</span>
|
629
|
+
32: <span class="ruby-ivar">@textLength</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">length</span>
|
630
|
+
33: <span class="ruby-comment cmt"># The number of current line.</span>
|
631
|
+
34: <span class="ruby-ivar">@lineNo</span> = <span class="ruby-value">1</span>
|
632
|
+
35: <span class="ruby-comment cmt"># This is the current position withing @text.</span>
|
633
|
+
36: <span class="ruby-ivar">@pos</span> = <span class="ruby-value">0</span>
|
634
|
+
37: <span class="ruby-comment cmt"># This flag is set to true whenever we are at the start of a text line.</span>
|
635
|
+
38: <span class="ruby-ivar">@beginOfLine</span> = <span class="ruby-keyword kw">true</span>
|
636
|
+
39: <span class="ruby-comment cmt"># This is the position of the start of the currently processed line.</span>
|
637
|
+
40: <span class="ruby-comment cmt"># It's only used for error reporting.</span>
|
638
|
+
41: <span class="ruby-ivar">@lineStart</span> = <span class="ruby-value">0</span>
|
639
|
+
42: <span class="ruby-comment cmt"># This variable stores the mode that the parser is operating in. The</span>
|
640
|
+
43: <span class="ruby-comment cmt"># following modes are supported:</span>
|
641
|
+
44: <span class="ruby-comment cmt"># :wiki : accept supported MediaWiki subset plus TJ extensions</span>
|
642
|
+
45: <span class="ruby-comment cmt"># :nowiki : ignore most markup except for the </nowiki> token</span>
|
643
|
+
46: <span class="ruby-comment cmt"># :funcarg : parse name and parameters of an block or inline parser</span>
|
644
|
+
47: <span class="ruby-comment cmt"># function.</span>
|
645
|
+
48: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:wiki</span>
|
646
|
+
49: <span class="ruby-comment cmt"># Enable to trigger printout instead of exception.</span>
|
647
|
+
50: <span class="ruby-ivar">@debug</span> = <span class="ruby-keyword kw">false</span>
|
648
|
+
51: <span class="ruby-keyword kw">end</span></pre>
|
649
|
+
</div>
|
650
|
+
|
651
|
+
</div>
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
</div>
|
657
|
+
|
658
|
+
|
659
|
+
</div>
|
660
|
+
|
661
|
+
<div id="public-instance-method-details" class="method-section section">
|
662
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
663
|
+
|
664
|
+
|
665
|
+
<div id="error-method" class="method-detail ">
|
666
|
+
<a name="M001470"></a>
|
667
|
+
|
668
|
+
<div class="method-heading">
|
669
|
+
|
670
|
+
<span class="method-name">error</span><span
|
671
|
+
class="method-args">(id, text, foo)</span>
|
672
|
+
<span class="method-click-advice">click to toggle source</span>
|
673
|
+
|
674
|
+
</div>
|
675
|
+
|
676
|
+
<div class="method-description">
|
677
|
+
|
678
|
+
<p>
|
679
|
+
The parser uses this function to report any errors during parsing.
|
680
|
+
</p>
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
<div class="method-source-code"
|
685
|
+
id="error-source">
|
686
|
+
<pre>
|
687
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 115</span>
|
688
|
+
115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">foo</span>)
|
689
|
+
116: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@debug</span>
|
690
|
+
117: <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"Line #{@lineNo}: #{text}\n"</span> <span class="ruby-operator">+</span>
|
691
|
+
118: <span class="ruby-node">"#{@text[@lineStart, @pos - @lineStart]}"</span>
|
692
|
+
119: <span class="ruby-keyword kw">else</span>
|
693
|
+
120: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RichTextException</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">id</span>, <span class="ruby-ivar">@lineNo</span>, <span class="ruby-identifier">text</span>,
|
694
|
+
121: <span class="ruby-ivar">@text</span>[<span class="ruby-ivar">@lineStart</span>, <span class="ruby-ivar">@pos</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@lineStart</span>])
|
695
|
+
122: <span class="ruby-keyword kw">end</span>
|
696
|
+
123: <span class="ruby-keyword kw">end</span></pre>
|
697
|
+
</div>
|
698
|
+
|
699
|
+
</div>
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
</div>
|
705
|
+
|
706
|
+
|
707
|
+
<div id="file-ame-method" class="method-detail ">
|
708
|
+
<a name="M001469"></a>
|
709
|
+
|
710
|
+
<div class="method-heading">
|
711
|
+
|
712
|
+
<span class="method-name">fileName</span><span
|
713
|
+
class="method-args">()</span>
|
714
|
+
<span class="method-click-advice">click to toggle source</span>
|
715
|
+
|
716
|
+
</div>
|
717
|
+
|
718
|
+
<div class="method-description">
|
719
|
+
|
720
|
+
<p>
|
721
|
+
This function makes more sense for parsers that process actual files. As we
|
722
|
+
don’t have a file name, we just return ‘input text’.
|
723
|
+
</p>
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
<div class="method-source-code"
|
728
|
+
id="file-ame-source">
|
729
|
+
<pre>
|
730
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 110</span>
|
731
|
+
110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fileName</span>
|
732
|
+
111: <span class="ruby-value str">'input text'</span>
|
733
|
+
112: <span class="ruby-keyword kw">end</span></pre>
|
734
|
+
</div>
|
735
|
+
|
736
|
+
</div>
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
</div>
|
742
|
+
|
743
|
+
|
744
|
+
<div id="next-oken-method" class="method-detail ">
|
745
|
+
<a name="M001466"></a>
|
746
|
+
|
747
|
+
<div class="method-heading">
|
748
|
+
|
749
|
+
<span class="method-name">nextToken</span><span
|
750
|
+
class="method-args">()</span>
|
751
|
+
<span class="method-click-advice">click to toggle source</span>
|
752
|
+
|
753
|
+
</div>
|
754
|
+
|
755
|
+
<div class="method-description">
|
756
|
+
|
757
|
+
<p>
|
758
|
+
Return the next token from the input text.
|
759
|
+
</p>
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
<div class="method-source-code"
|
764
|
+
id="next-oken-source">
|
765
|
+
<pre>
|
766
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 62</span>
|
767
|
+
62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextToken</span>
|
768
|
+
63: <span class="ruby-comment cmt"># If we have a returned token, this is returned first.</span>
|
769
|
+
64: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@tokenBuffer</span>
|
770
|
+
65: <span class="ruby-identifier">tok</span> = <span class="ruby-ivar">@tokenBuffer</span>
|
771
|
+
66: <span class="ruby-ivar">@tokenBuffer</span> = <span class="ruby-keyword kw">nil</span>
|
772
|
+
67: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">tok</span>
|
773
|
+
68: <span class="ruby-keyword kw">end</span>
|
774
|
+
69:
|
775
|
+
70: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:funcarg</span>
|
776
|
+
71: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">nextTokenFuncArg</span>
|
777
|
+
72: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:href</span>
|
778
|
+
73: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">nextTokenHRef</span>
|
779
|
+
74: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:ref</span>
|
780
|
+
75: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">nextTokenRef</span>
|
781
|
+
76: <span class="ruby-keyword kw">end</span>
|
782
|
+
77: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@beginOfLine</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:wiki</span>
|
783
|
+
78: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">res</span> = <span class="ruby-identifier">nextTokenWikiBOL</span>)
|
784
|
+
79: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">res</span>
|
785
|
+
80: <span class="ruby-keyword kw">end</span>
|
786
|
+
81: <span class="ruby-keyword kw">end</span>
|
787
|
+
82:
|
788
|
+
83: <span class="ruby-comment cmt"># Many inline control character sequences consit of multiple characters.</span>
|
789
|
+
84: <span class="ruby-comment cmt"># In case of incomplete sequences, we roll back to the start character</span>
|
790
|
+
85: <span class="ruby-comment cmt"># and set the ignoreInlineMarkup flag to simply treat them as normal</span>
|
791
|
+
86: <span class="ruby-comment cmt"># text.</span>
|
792
|
+
87: <span class="ruby-ivar">@ignoreInlineMarkup</span> = <span class="ruby-keyword kw">false</span>
|
793
|
+
88: <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
|
794
|
+
89: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span> = (<span class="ruby-ivar">@mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:wiki</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">nextTokenWikiInline</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">nextTokenNoWikiInline</span>)
|
795
|
+
90: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">res</span>
|
796
|
+
91: <span class="ruby-keyword kw">end</span>
|
797
|
+
92: <span class="ruby-keyword kw">end</span>
|
798
|
+
93: <span class="ruby-keyword kw">end</span></pre>
|
799
|
+
</div>
|
800
|
+
|
801
|
+
</div>
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
|
806
|
+
</div>
|
807
|
+
|
808
|
+
|
809
|
+
<div id="return-oken-method" class="method-detail ">
|
810
|
+
<a name="M001467"></a>
|
811
|
+
|
812
|
+
<div class="method-heading">
|
813
|
+
|
814
|
+
<span class="method-name">returnToken</span><span
|
815
|
+
class="method-args">(token)</span>
|
816
|
+
<span class="method-click-advice">click to toggle source</span>
|
817
|
+
|
818
|
+
</div>
|
819
|
+
|
820
|
+
<div class="method-description">
|
821
|
+
|
822
|
+
<p>
|
823
|
+
Return the last issued token to the token buffer.
|
824
|
+
</p>
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
<div class="method-source-code"
|
829
|
+
id="return-oken-source">
|
830
|
+
<pre>
|
831
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 96</span>
|
832
|
+
96: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">returnToken</span>(<span class="ruby-identifier">token</span>)
|
833
|
+
97: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@tokenBuffer</span>.<span class="ruby-identifier">nil?</span>
|
834
|
+
98: <span class="ruby-identifier">raise</span> <span class="ruby-constant">TjException</span>.<span class="ruby-identifier">new</span>, <span class="ruby-value str">'Token buffer overflow!'</span>
|
835
|
+
99: <span class="ruby-keyword kw">end</span>
|
836
|
+
100: <span class="ruby-ivar">@tokenBuffer</span> = <span class="ruby-identifier">token</span>
|
837
|
+
101: <span class="ruby-keyword kw">end</span></pre>
|
838
|
+
</div>
|
839
|
+
|
840
|
+
</div>
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
</div>
|
846
|
+
|
847
|
+
|
848
|
+
<div id="source-ile-nfo-method" class="method-detail ">
|
849
|
+
<a name="M001468"></a>
|
850
|
+
|
851
|
+
<div class="method-heading">
|
852
|
+
|
853
|
+
<span class="method-name">sourceFileInfo</span><span
|
854
|
+
class="method-args">()</span>
|
855
|
+
<span class="method-click-advice">click to toggle source</span>
|
856
|
+
|
857
|
+
</div>
|
858
|
+
|
859
|
+
<div class="method-description">
|
860
|
+
|
861
|
+
<p>
|
862
|
+
<a href="Report.html">Report</a> the current cursor position.
|
863
|
+
</p>
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
<div class="method-source-code"
|
868
|
+
id="source-ile-nfo-source">
|
869
|
+
<pre>
|
870
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 104</span>
|
871
|
+
104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sourceFileInfo</span>
|
872
|
+
105: [ <span class="ruby-ivar">@lineNo</span>, <span class="ruby-ivar">@pos</span> ]
|
873
|
+
106: <span class="ruby-keyword kw">end</span></pre>
|
874
|
+
</div>
|
875
|
+
|
876
|
+
</div>
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
|
881
|
+
</div>
|
882
|
+
|
883
|
+
|
884
|
+
</div>
|
885
|
+
|
886
|
+
<div id="private-instance-method-details" class="method-section section">
|
887
|
+
<h3 class="section-header">Private Instance Methods</h3>
|
888
|
+
|
889
|
+
|
890
|
+
<div id="is-d-tart-method" class="method-detail ">
|
891
|
+
<a name="M001488"></a>
|
892
|
+
|
893
|
+
<div class="method-heading">
|
894
|
+
|
895
|
+
<span class="method-name">isIdStart</span><span
|
896
|
+
class="method-args">(c)</span>
|
897
|
+
<span class="method-click-advice">click to toggle source</span>
|
898
|
+
|
899
|
+
</div>
|
900
|
+
|
901
|
+
<div class="method-description">
|
902
|
+
|
903
|
+
|
904
|
+
|
905
|
+
|
906
|
+
|
907
|
+
<div class="method-source-code"
|
908
|
+
id="is-d-tart-source">
|
909
|
+
<pre>
|
910
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 583</span>
|
911
|
+
583: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">isIdStart</span>(<span class="ruby-identifier">c</span>)
|
912
|
+
584: ((<span class="ruby-value str">'a'</span><span class="ruby-operator">..</span><span class="ruby-value str">'z'</span>) <span class="ruby-operator">===</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">||</span> (<span class="ruby-value str">'A'</span><span class="ruby-operator">..</span><span class="ruby-value str">'Z'</span>) <span class="ruby-operator">===</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'_'</span>)
|
913
|
+
585: <span class="ruby-keyword kw">end</span></pre>
|
914
|
+
</div>
|
915
|
+
|
916
|
+
</div>
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
</div>
|
922
|
+
|
923
|
+
|
924
|
+
<div id="next-har-method" class="method-detail ">
|
925
|
+
<a name="M001480"></a>
|
926
|
+
|
927
|
+
<div class="method-heading">
|
928
|
+
|
929
|
+
<span class="method-name">nextChar</span><span
|
930
|
+
class="method-args">()</span>
|
931
|
+
<span class="method-click-advice">click to toggle source</span>
|
932
|
+
|
933
|
+
</div>
|
934
|
+
|
935
|
+
<div class="method-description">
|
936
|
+
|
937
|
+
<p>
|
938
|
+
Deliver the next character. Keep track of the cursor position. In case we
|
939
|
+
reach the end, nil is returned.
|
940
|
+
</p>
|
941
|
+
|
942
|
+
|
943
|
+
|
944
|
+
<div class="method-source-code"
|
945
|
+
id="next-har-source">
|
946
|
+
<pre>
|
947
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 464</span>
|
948
|
+
464: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextChar</span>
|
949
|
+
465: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@pos</span> <span class="ruby-operator">>=</span> <span class="ruby-ivar">@textLength</span>
|
950
|
+
466: <span class="ruby-comment cmt"># Correct @pos so that returnChar works properly but mutliple reads of</span>
|
951
|
+
467: <span class="ruby-comment cmt"># EOT are ignored.</span>
|
952
|
+
468: <span class="ruby-ivar">@pos</span> = <span class="ruby-ivar">@textLength</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
953
|
+
469: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
954
|
+
470: <span class="ruby-keyword kw">end</span>
|
955
|
+
471: <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@text</span>[<span class="ruby-ivar">@pos</span>]
|
956
|
+
472: <span class="ruby-ivar">@pos</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
957
|
+
473: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value">\n\</span>
|
958
|
+
474: <span class="ruby-ivar">@lineNo</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
959
|
+
475: <span class="ruby-comment cmt"># Save the position of the line start for later use during error</span>
|
960
|
+
476: <span class="ruby-comment cmt"># reporting. The line begins after the newline.</span>
|
961
|
+
477: <span class="ruby-ivar">@lineStart</span> = <span class="ruby-ivar">@pos</span>
|
962
|
+
478: <span class="ruby-keyword kw">end</span>
|
963
|
+
479: <span class="ruby-comment cmt"># Since Ruby 1.9 is returning Strings for String#[] we need to emulate</span>
|
964
|
+
480: <span class="ruby-comment cmt"># this for Ruby 1.8.</span>
|
965
|
+
481: <span class="ruby-value str">''</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
966
|
+
482: <span class="ruby-keyword kw">end</span></pre>
|
967
|
+
</div>
|
968
|
+
|
969
|
+
</div>
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
|
974
|
+
</div>
|
975
|
+
|
976
|
+
|
977
|
+
<div id="next-oken-unc-rg-method" class="method-detail ">
|
978
|
+
<a name="M001471"></a>
|
979
|
+
|
980
|
+
<div class="method-heading">
|
981
|
+
|
982
|
+
<span class="method-name">nextTokenFuncArg</span><span
|
983
|
+
class="method-args">()</span>
|
984
|
+
<span class="method-click-advice">click to toggle source</span>
|
985
|
+
|
986
|
+
</div>
|
987
|
+
|
988
|
+
<div class="method-description">
|
989
|
+
|
990
|
+
<p>
|
991
|
+
Function arguments have the following formats:
|
992
|
+
</p>
|
993
|
+
<pre>
|
994
|
+
<[blockfunc par1="value1" par2='value2']>
|
995
|
+
<-inlinefunc par1="value1" ... -></pre>
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
<div class="method-source-code"
|
1000
|
+
id="next-oken-unc-rg-source">
|
1001
|
+
<pre>
|
1002
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 130</span>
|
1003
|
+
130: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenFuncArg</span>
|
1004
|
+
131: <span class="ruby-identifier">token</span> = [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'<END>'</span> ]
|
1005
|
+
132: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>)
|
1006
|
+
133: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">c</span>
|
1007
|
+
134: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">' '</span>, <span class="ruby-value str">"\n"</span>, <span class="ruby-value str">"\t"</span>
|
1008
|
+
135: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">tok</span> = <span class="ruby-identifier">readBlanks</span>(<span class="ruby-identifier">c</span>))
|
1009
|
+
136: <span class="ruby-identifier">token</span> = <span class="ruby-identifier">tok</span>
|
1010
|
+
137: <span class="ruby-keyword kw">break</span>
|
1011
|
+
138: <span class="ruby-keyword kw">end</span>
|
1012
|
+
139: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'='</span>
|
1013
|
+
140: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'_='</span>, <span class="ruby-value str">'='</span> ]
|
1014
|
+
141: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"'"</span>
|
1015
|
+
142: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">readString</span>(<span class="ruby-identifier">c</span>)
|
1016
|
+
143: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'"'</span>
|
1017
|
+
144: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">readString</span>(<span class="ruby-identifier">c</span>)
|
1018
|
+
145: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'a'</span><span class="ruby-operator">..</span><span class="ruby-value str">'z'</span>, <span class="ruby-value str">'A'</span><span class="ruby-operator">..</span><span class="ruby-value str">'Z'</span>, <span class="ruby-value str">'_'</span>
|
1019
|
+
146: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">readId</span>(<span class="ruby-identifier">c</span>)
|
1020
|
+
147: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">']'</span>
|
1021
|
+
148: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'>'</span>
|
1022
|
+
149: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:wiki</span>
|
1023
|
+
150: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'BLOCKFUNCEND'</span>, <span class="ruby-value str">']>'</span> ]
|
1024
|
+
151: <span class="ruby-keyword kw">end</span>
|
1025
|
+
152: <span class="ruby-identifier">returnChar</span>
|
1026
|
+
153: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'-'</span>
|
1027
|
+
154: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'>'</span>
|
1028
|
+
155: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:wiki</span>
|
1029
|
+
156: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'INLINEFUNCEND'</span>, <span class="ruby-value str">'->'</span> ]
|
1030
|
+
157: <span class="ruby-keyword kw">end</span>
|
1031
|
+
158: <span class="ruby-identifier">returnChar</span>
|
1032
|
+
159: <span class="ruby-keyword kw">end</span>
|
1033
|
+
160: <span class="ruby-keyword kw">end</span>
|
1034
|
+
161: <span class="ruby-identifier">token</span>
|
1035
|
+
162: <span class="ruby-keyword kw">end</span></pre>
|
1036
|
+
</div>
|
1037
|
+
|
1038
|
+
</div>
|
1039
|
+
|
1040
|
+
|
1041
|
+
|
1042
|
+
|
1043
|
+
</div>
|
1044
|
+
|
1045
|
+
|
1046
|
+
<div id="next-oken-ef-method" class="method-detail ">
|
1047
|
+
<a name="M001473"></a>
|
1048
|
+
|
1049
|
+
<div class="method-heading">
|
1050
|
+
|
1051
|
+
<span class="method-name">nextTokenHRef</span><span
|
1052
|
+
class="method-args">()</span>
|
1053
|
+
<span class="method-click-advice">click to toggle source</span>
|
1054
|
+
|
1055
|
+
</div>
|
1056
|
+
|
1057
|
+
<div class="method-description">
|
1058
|
+
|
1059
|
+
|
1060
|
+
|
1061
|
+
|
1062
|
+
|
1063
|
+
<div class="method-source-code"
|
1064
|
+
id="next-oken-ef-source">
|
1065
|
+
<pre>
|
1066
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 188</span>
|
1067
|
+
188: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenHRef</span>
|
1068
|
+
189: <span class="ruby-identifier">token</span> = [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'<END>'</span> ]
|
1069
|
+
190: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>)
|
1070
|
+
191: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
1071
|
+
192: <span class="ruby-comment cmt"># We've reached the end of the text.</span>
|
1072
|
+
193: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">token</span>
|
1073
|
+
194: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">' '</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"\t"</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"\n"</span>
|
1074
|
+
195: <span class="ruby-comment cmt"># Sequences of tabs, spaces and newlines are treated as token</span>
|
1075
|
+
196: <span class="ruby-comment cmt"># boundaries, but otherwise they are ignored.</span>
|
1076
|
+
197: <span class="ruby-identifier">readSequence</span>(<span class="ruby-value str">" \n\t"</span>)
|
1077
|
+
198: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'SPACE'</span>, <span class="ruby-value str">' '</span> ]
|
1078
|
+
199: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'<'</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@ignoreInlineMarkup</span>
|
1079
|
+
200: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'-'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">isIdStart</span>(<span class="ruby-identifier">peek</span>(<span class="ruby-value">1</span>))
|
1080
|
+
201: <span class="ruby-identifier">token</span> = <span class="ruby-identifier">readId</span>(<span class="ruby-value str">''</span>, <span class="ruby-value str">'QUERY'</span>)
|
1081
|
+
202: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'-'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'>'</span>
|
1082
|
+
203: <span class="ruby-identifier">error</span>(<span class="ruby-value str">'unterminated_query'</span>,
|
1083
|
+
204: <span class="ruby-value str">"Inline query must be terminated with '->'"</span>)
|
1084
|
+
205: <span class="ruby-keyword kw">end</span>
|
1085
|
+
206: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">token</span>
|
1086
|
+
207: <span class="ruby-keyword kw">else</span>
|
1087
|
+
208: <span class="ruby-comment cmt"># It's not a query.</span>
|
1088
|
+
209: <span class="ruby-identifier">returnChar</span>(<span class="ruby-value">2</span>)
|
1089
|
+
210: <span class="ruby-ivar">@ignoreInlineMarkup</span> = <span class="ruby-keyword kw">true</span>
|
1090
|
+
211: <span class="ruby-keyword kw">next</span>
|
1091
|
+
212: <span class="ruby-keyword kw">end</span>
|
1092
|
+
213: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">']'</span>
|
1093
|
+
214: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:wiki</span>
|
1094
|
+
215: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'HREFEND'</span>, <span class="ruby-value str">']'</span> ]
|
1095
|
+
216: <span class="ruby-keyword kw">else</span>
|
1096
|
+
217: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">nextTokenWord</span>(<span class="ruby-identifier">c</span>)
|
1097
|
+
218: <span class="ruby-keyword kw">end</span>
|
1098
|
+
219: <span class="ruby-keyword kw">end</span>
|
1099
|
+
220: <span class="ruby-identifier">token</span>
|
1100
|
+
221: <span class="ruby-keyword kw">end</span></pre>
|
1101
|
+
</div>
|
1102
|
+
|
1103
|
+
</div>
|
1104
|
+
|
1105
|
+
|
1106
|
+
|
1107
|
+
|
1108
|
+
</div>
|
1109
|
+
|
1110
|
+
|
1111
|
+
<div id="next-oken-ewline-method" class="method-detail ">
|
1112
|
+
<a name="M001477"></a>
|
1113
|
+
|
1114
|
+
<div class="method-heading">
|
1115
|
+
|
1116
|
+
<span class="method-name">nextTokenNewline</span><span
|
1117
|
+
class="method-args">()</span>
|
1118
|
+
<span class="method-click-advice">click to toggle source</span>
|
1119
|
+
|
1120
|
+
</div>
|
1121
|
+
|
1122
|
+
<div class="method-description">
|
1123
|
+
|
1124
|
+
<p>
|
1125
|
+
We’ve just read a newline. Now we need to figure out whether this is
|
1126
|
+
a LINEBREAK or just a SPACE. This is determined by looking at the next
|
1127
|
+
character.
|
1128
|
+
</p>
|
1129
|
+
|
1130
|
+
|
1131
|
+
|
1132
|
+
<div class="method-source-code"
|
1133
|
+
id="next-oken-ewline-source">
|
1134
|
+
<pre>
|
1135
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 379</span>
|
1136
|
+
379: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenNewline</span>
|
1137
|
+
380: <span class="ruby-comment cmt"># Newlines are pretty important as they can terminate blocks and turn</span>
|
1138
|
+
381: <span class="ruby-comment cmt"># the next character into the start of a control sequence.</span>
|
1139
|
+
382: <span class="ruby-comment cmt"># Hard linebreaks consist of a newline followed by another newline or</span>
|
1140
|
+
383: <span class="ruby-comment cmt"># any of the begin-of-line control characters.</span>
|
1141
|
+
384: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>).<span class="ruby-identifier">nil?</span>
|
1142
|
+
385: <span class="ruby-comment cmt"># We hit the end of the text.</span>
|
1143
|
+
386: [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'<END>'</span> ]
|
1144
|
+
387: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'<'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">peekMatch</span>(<span class="ruby-value str">'['</span>)
|
1145
|
+
388: <span class="ruby-comment cmt"># the '<' can be a start of a block (BLOCKFUNCSTART) or inline text</span>
|
1146
|
+
389: <span class="ruby-comment cmt"># (INLINEFUNCSTART). Only for the first case the linebreak is real.</span>
|
1147
|
+
390: <span class="ruby-identifier">returnChar</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"\n"</span>
|
1148
|
+
391: <span class="ruby-comment cmt"># The next character may be a control character.</span>
|
1149
|
+
392: <span class="ruby-ivar">@beginOfLine</span> = <span class="ruby-keyword kw">true</span>
|
1150
|
+
393: [ <span class="ruby-value str">'LINEBREAK'</span>, <span class="ruby-value str">"\n"</span> ]
|
1151
|
+
394: <span class="ruby-keyword kw">elsif</span> <span class="ruby-node">"\n*#=-"</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">c</span>)
|
1152
|
+
395: <span class="ruby-comment cmt"># These characters correspond to the first characters of a block</span>
|
1153
|
+
396: <span class="ruby-comment cmt"># element. When they are found at the begin of the line, the newline</span>
|
1154
|
+
397: <span class="ruby-comment cmt"># was really a line break.</span>
|
1155
|
+
398: <span class="ruby-identifier">returnChar</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"\n"</span>
|
1156
|
+
399: <span class="ruby-comment cmt"># The next character may be a control character.</span>
|
1157
|
+
400: <span class="ruby-ivar">@beginOfLine</span> = <span class="ruby-keyword kw">true</span>
|
1158
|
+
401: [ <span class="ruby-value str">'LINEBREAK'</span>, <span class="ruby-value str">"\n"</span> ]
|
1159
|
+
402: <span class="ruby-keyword kw">else</span>
|
1160
|
+
403: <span class="ruby-comment cmt"># Single line breaks are treated as spaces. Return the char after</span>
|
1161
|
+
404: <span class="ruby-comment cmt"># the newline and start with this one again.</span>
|
1162
|
+
405: <span class="ruby-identifier">returnChar</span>
|
1163
|
+
406: [ <span class="ruby-value str">'SPACE'</span>, <span class="ruby-value str">' '</span> ]
|
1164
|
+
407: <span class="ruby-keyword kw">end</span>
|
1165
|
+
408: <span class="ruby-keyword kw">end</span></pre>
|
1166
|
+
</div>
|
1167
|
+
|
1168
|
+
</div>
|
1169
|
+
|
1170
|
+
|
1171
|
+
|
1172
|
+
|
1173
|
+
</div>
|
1174
|
+
|
1175
|
+
|
1176
|
+
<div id="next-oken-o-iki-nline-method" class="method-detail ">
|
1177
|
+
<a name="M001476"></a>
|
1178
|
+
|
1179
|
+
<div class="method-heading">
|
1180
|
+
|
1181
|
+
<span class="method-name">nextTokenNoWikiInline</span><span
|
1182
|
+
class="method-args">()</span>
|
1183
|
+
<span class="method-click-advice">click to toggle source</span>
|
1184
|
+
|
1185
|
+
</div>
|
1186
|
+
|
1187
|
+
<div class="method-description">
|
1188
|
+
|
1189
|
+
|
1190
|
+
|
1191
|
+
|
1192
|
+
|
1193
|
+
<div class="method-source-code"
|
1194
|
+
id="next-oken-o-iki-nline-source">
|
1195
|
+
<pre>
|
1196
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 357</span>
|
1197
|
+
357: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenNoWikiInline</span>
|
1198
|
+
358: <span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>
|
1199
|
+
359: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
1200
|
+
360: <span class="ruby-comment cmt"># We've reached the end of the text.</span>
|
1201
|
+
361: [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'<END>'</span> ]
|
1202
|
+
362: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">' '</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"\t"</span>
|
1203
|
+
363: <span class="ruby-comment cmt"># Sequences of tabs or spaces are treated as token boundaries, but</span>
|
1204
|
+
364: <span class="ruby-comment cmt"># otherwise they are ignored.</span>
|
1205
|
+
365: <span class="ruby-identifier">readSequence</span>(<span class="ruby-value str">" \t"</span>)
|
1206
|
+
366: [ <span class="ruby-value str">'SPACE'</span>, <span class="ruby-value str">' '</span> ]
|
1207
|
+
367: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"\n"</span>
|
1208
|
+
368: <span class="ruby-identifier">nextTokenNewline</span>
|
1209
|
+
369: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'<'</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@ignoreInlineMarkup</span>
|
1210
|
+
370: <span class="ruby-identifier">nextTokenOpenAngle</span>
|
1211
|
+
371: <span class="ruby-keyword kw">else</span>
|
1212
|
+
372: <span class="ruby-identifier">nextTokenWord</span>(<span class="ruby-identifier">c</span>)
|
1213
|
+
373: <span class="ruby-keyword kw">end</span>
|
1214
|
+
374: <span class="ruby-keyword kw">end</span></pre>
|
1215
|
+
</div>
|
1216
|
+
|
1217
|
+
</div>
|
1218
|
+
|
1219
|
+
|
1220
|
+
|
1221
|
+
|
1222
|
+
</div>
|
1223
|
+
|
1224
|
+
|
1225
|
+
<div id="next-oken-pen-ngle-method" class="method-detail ">
|
1226
|
+
<a name="M001478"></a>
|
1227
|
+
|
1228
|
+
<div class="method-heading">
|
1229
|
+
|
1230
|
+
<span class="method-name">nextTokenOpenAngle</span><span
|
1231
|
+
class="method-args">()</span>
|
1232
|
+
<span class="method-click-advice">click to toggle source</span>
|
1233
|
+
|
1234
|
+
</div>
|
1235
|
+
|
1236
|
+
<div class="method-description">
|
1237
|
+
|
1238
|
+
|
1239
|
+
|
1240
|
+
|
1241
|
+
|
1242
|
+
<div class="method-source-code"
|
1243
|
+
id="next-oken-pen-ngle-source">
|
1244
|
+
<pre>
|
1245
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 410</span>
|
1246
|
+
410: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenOpenAngle</span>
|
1247
|
+
411: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">peekMatch</span>(<span class="ruby-value str">'nowiki>'</span>)
|
1248
|
+
412: <span class="ruby-comment cmt"># Turn most wiki markup interpretation off.</span>
|
1249
|
+
413: <span class="ruby-ivar">@pos</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">'nowiki>'</span>.<span class="ruby-identifier">length</span>
|
1250
|
+
414: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:nowiki</span>
|
1251
|
+
415: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">peekMatch</span>(<span class="ruby-value str">'/nowiki>'</span>)
|
1252
|
+
416: <span class="ruby-comment cmt"># Turn most wiki markup interpretation on.</span>
|
1253
|
+
417: <span class="ruby-ivar">@pos</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">'/nowiki>'</span>.<span class="ruby-identifier">length</span>
|
1254
|
+
418: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:wiki</span>
|
1255
|
+
419: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">peekMatch</span>(<span class="ruby-value str">'-'</span>) <span class="ruby-operator">&&</span> <span class="ruby-ivar">@mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:wiki</span>
|
1256
|
+
420: <span class="ruby-identifier">nextChar</span>
|
1257
|
+
421: <span class="ruby-comment cmt"># Switch the parser to function argument parsing mode.</span>
|
1258
|
+
422: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:funcarg</span>
|
1259
|
+
423: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'INLINEFUNCSTART'</span>, <span class="ruby-value str">'<-'</span> ]
|
1260
|
+
424: <span class="ruby-keyword kw">else</span>
|
1261
|
+
425: <span class="ruby-comment cmt"># We've not found a valid control sequence. Push back the character</span>
|
1262
|
+
426: <span class="ruby-comment cmt"># and make sure we treat it as a normal character.</span>
|
1263
|
+
427: <span class="ruby-ivar">@ignoreInlineMarkup</span> = <span class="ruby-keyword kw">true</span>
|
1264
|
+
428: <span class="ruby-identifier">returnChar</span>
|
1265
|
+
429: <span class="ruby-keyword kw">end</span>
|
1266
|
+
430: <span class="ruby-keyword kw">nil</span>
|
1267
|
+
431: <span class="ruby-keyword kw">end</span></pre>
|
1268
|
+
</div>
|
1269
|
+
|
1270
|
+
</div>
|
1271
|
+
|
1272
|
+
|
1273
|
+
|
1274
|
+
|
1275
|
+
</div>
|
1276
|
+
|
1277
|
+
|
1278
|
+
<div id="next-oken-ef-method" class="method-detail ">
|
1279
|
+
<a name="M001472"></a>
|
1280
|
+
|
1281
|
+
<div class="method-heading">
|
1282
|
+
|
1283
|
+
<span class="method-name">nextTokenRef</span><span
|
1284
|
+
class="method-args">()</span>
|
1285
|
+
<span class="method-click-advice">click to toggle source</span>
|
1286
|
+
|
1287
|
+
</div>
|
1288
|
+
|
1289
|
+
<div class="method-description">
|
1290
|
+
|
1291
|
+
|
1292
|
+
|
1293
|
+
|
1294
|
+
|
1295
|
+
<div class="method-source-code"
|
1296
|
+
id="next-oken-ef-source">
|
1297
|
+
<pre>
|
1298
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 164</span>
|
1299
|
+
164: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenRef</span>
|
1300
|
+
165: <span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>
|
1301
|
+
166: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'<END'</span> ] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
1302
|
+
167:
|
1303
|
+
168: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'LITERAL'</span>, <span class="ruby-value str">'|'</span> ] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'|'</span>
|
1304
|
+
169:
|
1305
|
+
170: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">']'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">peek</span> <span class="ruby-operator">==</span> <span class="ruby-value str">']'</span>
|
1306
|
+
171: <span class="ruby-identifier">nextChar</span>
|
1307
|
+
172: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:wiki</span>
|
1308
|
+
173: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'REFEND'</span>, <span class="ruby-value str">']]'</span> ]
|
1309
|
+
174: <span class="ruby-keyword kw">end</span>
|
1310
|
+
175:
|
1311
|
+
176: <span class="ruby-identifier">token</span> = <span class="ruby-identifier">c</span>
|
1312
|
+
177: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>)
|
1313
|
+
178: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
1314
|
+
179: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'|'</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">']'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">peek</span> <span class="ruby-operator">==</span> <span class="ruby-value str">']'</span>)
|
1315
|
+
180: <span class="ruby-identifier">returnChar</span>
|
1316
|
+
181: <span class="ruby-keyword kw">break</span>
|
1317
|
+
182: <span class="ruby-keyword kw">end</span>
|
1318
|
+
183: <span class="ruby-identifier">token</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1319
|
+
184: <span class="ruby-keyword kw">end</span>
|
1320
|
+
185: [ <span class="ruby-value str">'WORD'</span>, <span class="ruby-identifier">token</span> ]
|
1321
|
+
186: <span class="ruby-keyword kw">end</span></pre>
|
1322
|
+
</div>
|
1323
|
+
|
1324
|
+
</div>
|
1325
|
+
|
1326
|
+
|
1327
|
+
|
1328
|
+
|
1329
|
+
</div>
|
1330
|
+
|
1331
|
+
|
1332
|
+
<div id="next-oken-iki--method" class="method-detail ">
|
1333
|
+
<a name="M001474"></a>
|
1334
|
+
|
1335
|
+
<div class="method-heading">
|
1336
|
+
|
1337
|
+
<span class="method-name">nextTokenWikiBOL</span><span
|
1338
|
+
class="method-args">()</span>
|
1339
|
+
<span class="method-click-advice">click to toggle source</span>
|
1340
|
+
|
1341
|
+
</div>
|
1342
|
+
|
1343
|
+
<div class="method-description">
|
1344
|
+
|
1345
|
+
|
1346
|
+
|
1347
|
+
|
1348
|
+
|
1349
|
+
<div class="method-source-code"
|
1350
|
+
id="next-oken-iki--source">
|
1351
|
+
<pre>
|
1352
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 223</span>
|
1353
|
+
223: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenWikiBOL</span>
|
1354
|
+
224: <span class="ruby-comment cmt"># Some characters have only a special meaning at the start of the line.</span>
|
1355
|
+
225: <span class="ruby-comment cmt"># When the last token pushed the cursor into a new line, this flag is set</span>
|
1356
|
+
226: <span class="ruby-comment cmt"># to true.</span>
|
1357
|
+
227:
|
1358
|
+
228: <span class="ruby-comment cmt"># Reset the flag again.</span>
|
1359
|
+
229: <span class="ruby-ivar">@beginOfLine</span> = <span class="ruby-keyword kw">false</span>
|
1360
|
+
230:
|
1361
|
+
231: <span class="ruby-comment cmt"># We already know that the last newline was a real linebreak. Further</span>
|
1362
|
+
232: <span class="ruby-comment cmt"># newlines can safely be ignored.</span>
|
1363
|
+
233: <span class="ruby-identifier">readSequence</span>(<span class="ruby-value str">"\n"</span>)
|
1364
|
+
234:
|
1365
|
+
235: <span class="ruby-comment cmt"># All the lead characters of a token here also need to be registered</span>
|
1366
|
+
236: <span class="ruby-comment cmt"># with nextTokenNewline!</span>
|
1367
|
+
237: <span class="ruby-keyword kw">case</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>)
|
1368
|
+
238: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'='</span>
|
1369
|
+
239: <span class="ruby-comment cmt"># Headings start with 2 or more = and must be followed by a space.</span>
|
1370
|
+
240: <span class="ruby-identifier">level</span> = <span class="ruby-identifier">readSequenceMax</span>(<span class="ruby-value str">'='</span>, <span class="ruby-value">4</span>)
|
1371
|
+
241: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">level</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
1372
|
+
242: <span class="ruby-comment cmt"># 1 = does not mean anything. Push it back and process it as normal</span>
|
1373
|
+
243: <span class="ruby-comment cmt"># text further down.</span>
|
1374
|
+
244: <span class="ruby-identifier">returnChar</span>
|
1375
|
+
245: <span class="ruby-keyword kw">else</span>
|
1376
|
+
246: <span class="ruby-comment cmt"># Between the = characters and the title text must be exactly one</span>
|
1377
|
+
247: <span class="ruby-comment cmt"># space.</span>
|
1378
|
+
248: <span class="ruby-keyword kw">return</span> [ <span class="ruby-node">"TITLE#{level - 1}"</span>, <span class="ruby-value str">'='</span> * <span class="ruby-identifier">level</span> ] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">' '</span>
|
1379
|
+
249: <span class="ruby-comment cmt"># If that's missing, The = are treated as normal text further down.</span>
|
1380
|
+
250: <span class="ruby-identifier">returnChar</span>(<span class="ruby-identifier">level</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
|
1381
|
+
251: <span class="ruby-keyword kw">end</span>
|
1382
|
+
252: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'-'</span>
|
1383
|
+
253: <span class="ruby-comment cmt"># Horizontal ruler. Must have exactly 4 -.</span>
|
1384
|
+
254: <span class="ruby-identifier">level</span> = <span class="ruby-identifier">readSequenceMax</span>(<span class="ruby-value str">'-'</span>, <span class="ruby-value">4</span>)
|
1385
|
+
255: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">"HLINE"</span>, <span class="ruby-value str">'-'</span> * <span class="ruby-value">4</span> ] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">level</span> <span class="ruby-operator">==</span> <span class="ruby-value">4</span>
|
1386
|
+
256: <span class="ruby-identifier">returnChar</span>(<span class="ruby-identifier">level</span>)
|
1387
|
+
257: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'*'</span>
|
1388
|
+
258: <span class="ruby-comment cmt"># Bullet lists start with one to three * characters.</span>
|
1389
|
+
259: <span class="ruby-identifier">level</span> = <span class="ruby-identifier">readSequenceMax</span>(<span class="ruby-value str">'*'</span>)
|
1390
|
+
260: <span class="ruby-comment cmt"># Between the * characters and the bullet text must be exactly one</span>
|
1391
|
+
261: <span class="ruby-comment cmt"># space.</span>
|
1392
|
+
262: <span class="ruby-keyword kw">return</span> [ <span class="ruby-node">"BULLET#{level}"</span>, <span class="ruby-value str">'*'</span> * <span class="ruby-identifier">level</span> ] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">' '</span>
|
1393
|
+
263: <span class="ruby-comment cmt"># If that's missing, The # are treated as normal text further down.</span>
|
1394
|
+
264: <span class="ruby-identifier">returnChar</span>(<span class="ruby-identifier">level</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
|
1395
|
+
265: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'#'</span>
|
1396
|
+
266: <span class="ruby-comment cmt"># Numbered list start with one to three # characters.</span>
|
1397
|
+
267: <span class="ruby-identifier">level</span> = <span class="ruby-identifier">readSequenceMax</span>(<span class="ruby-value str">'#'</span>)
|
1398
|
+
268: <span class="ruby-comment cmt"># Between the # characters and the bullet text must be exactly one</span>
|
1399
|
+
269: <span class="ruby-comment cmt"># space.</span>
|
1400
|
+
270: <span class="ruby-keyword kw">return</span> [ <span class="ruby-node">"NUMBER#{level}"</span>, <span class="ruby-value str">'#'</span> * <span class="ruby-identifier">level</span> ] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">' '</span>
|
1401
|
+
271: <span class="ruby-comment cmt"># If that's missing, The # are treated as normal text further down.</span>
|
1402
|
+
272: <span class="ruby-identifier">returnChar</span>(<span class="ruby-identifier">level</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
|
1403
|
+
273: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'<'</span>
|
1404
|
+
274: <span class="ruby-comment cmt"># This may be the start of a block generating function.</span>
|
1405
|
+
275: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'['</span>
|
1406
|
+
276: <span class="ruby-comment cmt"># Switch the parser to block function argument parsing mode.</span>
|
1407
|
+
277: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:funcarg</span>
|
1408
|
+
278: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">'BLOCKFUNCSTART'</span>, <span class="ruby-value str">'<['</span> ]
|
1409
|
+
279: <span class="ruby-keyword kw">end</span>
|
1410
|
+
280: <span class="ruby-comment cmt"># Maybe not.</span>
|
1411
|
+
281: <span class="ruby-identifier">returnChar</span>(<span class="ruby-value">2</span>)
|
1412
|
+
282: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">' '</span>
|
1413
|
+
283: <span class="ruby-comment cmt"># Lines that start with a space are treated as verbatim text.</span>
|
1414
|
+
284: <span class="ruby-keyword kw">return</span> [ <span class="ruby-value str">"PRE"</span>, <span class="ruby-identifier">readCode</span> ] <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">peek</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"\n"</span>
|
1415
|
+
285: <span class="ruby-keyword kw">else</span>
|
1416
|
+
286: <span class="ruby-comment cmt"># If the character is not a known control character we push it back</span>
|
1417
|
+
287: <span class="ruby-comment cmt"># and treat it as normal text further down.</span>
|
1418
|
+
288: <span class="ruby-identifier">returnChar</span>
|
1419
|
+
289: <span class="ruby-keyword kw">end</span>
|
1420
|
+
290:
|
1421
|
+
291: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1422
|
+
292: <span class="ruby-keyword kw">end</span></pre>
|
1423
|
+
</div>
|
1424
|
+
|
1425
|
+
</div>
|
1426
|
+
|
1427
|
+
|
1428
|
+
|
1429
|
+
|
1430
|
+
</div>
|
1431
|
+
|
1432
|
+
|
1433
|
+
<div id="next-oken-iki-nline-method" class="method-detail ">
|
1434
|
+
<a name="M001475"></a>
|
1435
|
+
|
1436
|
+
<div class="method-heading">
|
1437
|
+
|
1438
|
+
<span class="method-name">nextTokenWikiInline</span><span
|
1439
|
+
class="method-args">()</span>
|
1440
|
+
<span class="method-click-advice">click to toggle source</span>
|
1441
|
+
|
1442
|
+
</div>
|
1443
|
+
|
1444
|
+
<div class="method-description">
|
1445
|
+
|
1446
|
+
|
1447
|
+
|
1448
|
+
|
1449
|
+
|
1450
|
+
<div class="method-source-code"
|
1451
|
+
id="next-oken-iki-nline-source">
|
1452
|
+
<pre>
|
1453
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 294</span>
|
1454
|
+
294: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenWikiInline</span>
|
1455
|
+
295: <span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>
|
1456
|
+
296: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
1457
|
+
297: <span class="ruby-comment cmt"># We've reached the end of the text.</span>
|
1458
|
+
298: [ <span class="ruby-value str">'.'</span>, <span class="ruby-value str">'<END>'</span> ]
|
1459
|
+
299: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">' '</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"\t"</span>
|
1460
|
+
300: <span class="ruby-comment cmt"># Sequences of tabs or spaces are treated as token boundaries, but</span>
|
1461
|
+
301: <span class="ruby-comment cmt"># otherwise they are ignored.</span>
|
1462
|
+
302: <span class="ruby-identifier">readSequence</span>(<span class="ruby-value str">" \t"</span>)
|
1463
|
+
303: [ <span class="ruby-value str">'SPACE'</span>, <span class="ruby-value str">' '</span> ]
|
1464
|
+
304: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"'"</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@ignoreInlineMarkup</span>
|
1465
|
+
305: <span class="ruby-comment cmt"># Sequence of 2 ' means italic, 3 ' means bold, 4 ' means monospaced</span>
|
1466
|
+
306: <span class="ruby-comment cmt"># code, 5 ' means italic and bold. Anything else is just normal text.</span>
|
1467
|
+
307: <span class="ruby-identifier">level</span> = <span class="ruby-identifier">readSequenceMax</span>(<span class="ruby-value str">"'"</span>, <span class="ruby-value">5</span>)
|
1468
|
+
308: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">level</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span>
|
1469
|
+
309: [ <span class="ruby-value str">'ITALIC'</span>, <span class="ruby-value str">"'"</span> * <span class="ruby-identifier">level</span> ]
|
1470
|
+
310: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">level</span> <span class="ruby-operator">==</span> <span class="ruby-value">3</span>
|
1471
|
+
311: [ <span class="ruby-value str">'BOLD'</span>, <span class="ruby-value str">"'"</span> * <span class="ruby-identifier">level</span> ]
|
1472
|
+
312: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">level</span> <span class="ruby-operator">==</span> <span class="ruby-value">4</span>
|
1473
|
+
313: [ <span class="ruby-value str">'CODE'</span>, <span class="ruby-value str">"'"</span> * <span class="ruby-identifier">level</span> ]
|
1474
|
+
314: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">level</span> <span class="ruby-operator">==</span> <span class="ruby-value">5</span>
|
1475
|
+
315: [ <span class="ruby-value str">'BOLDITALIC'</span>, <span class="ruby-value str">"'"</span> * <span class="ruby-identifier">level</span> ]
|
1476
|
+
316: <span class="ruby-keyword kw">else</span>
|
1477
|
+
317: <span class="ruby-comment cmt"># We have not found the right syntax. Treat the found characters as</span>
|
1478
|
+
318: <span class="ruby-comment cmt"># normal text. Push all ' back and start again but ignoring the '</span>
|
1479
|
+
319: <span class="ruby-comment cmt"># code for once.</span>
|
1480
|
+
320: <span class="ruby-identifier">returnChar</span>(<span class="ruby-identifier">level</span>)
|
1481
|
+
321: <span class="ruby-ivar">@ignoreInlineMarkup</span> = <span class="ruby-keyword kw">true</span>
|
1482
|
+
322: <span class="ruby-keyword kw">nil</span>
|
1483
|
+
323: <span class="ruby-keyword kw">end</span>
|
1484
|
+
324: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'='</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@ignoreInlineMarkup</span>
|
1485
|
+
325: <span class="ruby-identifier">level</span> = <span class="ruby-identifier">readSequenceMax</span>(<span class="ruby-value str">'='</span>, <span class="ruby-value">4</span>)
|
1486
|
+
326: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">level</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
1487
|
+
327: [ <span class="ruby-node">"TITLE#{level - 1}END"</span>, <span class="ruby-value str">'='</span> * <span class="ruby-identifier">level</span> ]
|
1488
|
+
328: <span class="ruby-keyword kw">else</span>
|
1489
|
+
329: <span class="ruby-comment cmt"># We have not found the right syntax. Treat found characters as</span>
|
1490
|
+
330: <span class="ruby-comment cmt"># normal text. Push all = back and start again but ignoring the =</span>
|
1491
|
+
331: <span class="ruby-comment cmt"># code for once.</span>
|
1492
|
+
332: <span class="ruby-identifier">returnChar</span>(<span class="ruby-identifier">level</span>)
|
1493
|
+
333: <span class="ruby-ivar">@ignoreInlineMarkup</span> = <span class="ruby-keyword kw">true</span>
|
1494
|
+
334: <span class="ruby-keyword kw">nil</span>
|
1495
|
+
335: <span class="ruby-keyword kw">end</span>
|
1496
|
+
336: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'['</span>
|
1497
|
+
337: <span class="ruby-identifier">level</span> = <span class="ruby-identifier">readSequenceMax</span>(<span class="ruby-value str">'['</span>, <span class="ruby-value">2</span>)
|
1498
|
+
338: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">level</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
1499
|
+
339: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:href</span>
|
1500
|
+
340: [ <span class="ruby-value str">'HREF'</span> , <span class="ruby-value str">'['</span> ]
|
1501
|
+
341: <span class="ruby-keyword kw">else</span>
|
1502
|
+
342: <span class="ruby-ivar">@mode</span> = <span class="ruby-value">:ref</span>
|
1503
|
+
343: [ <span class="ruby-value str">'REF'</span>, <span class="ruby-value str">'[['</span> ]
|
1504
|
+
344: <span class="ruby-keyword kw">end</span>
|
1505
|
+
345: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">']'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">peek</span> <span class="ruby-operator">==</span> <span class="ruby-value str">']'</span>
|
1506
|
+
346: <span class="ruby-identifier">nextChar</span>
|
1507
|
+
347: [ <span class="ruby-value str">'REFEND'</span>, <span class="ruby-value str">']]'</span> ]
|
1508
|
+
348: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"\n"</span>
|
1509
|
+
349: <span class="ruby-identifier">nextTokenNewline</span>
|
1510
|
+
350: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'<'</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@ignoreInlineMarkup</span>
|
1511
|
+
351: <span class="ruby-identifier">nextTokenOpenAngle</span>
|
1512
|
+
352: <span class="ruby-keyword kw">else</span>
|
1513
|
+
353: <span class="ruby-identifier">nextTokenWord</span>(<span class="ruby-identifier">c</span>)
|
1514
|
+
354: <span class="ruby-keyword kw">end</span>
|
1515
|
+
355: <span class="ruby-keyword kw">end</span></pre>
|
1516
|
+
</div>
|
1517
|
+
|
1518
|
+
</div>
|
1519
|
+
|
1520
|
+
|
1521
|
+
|
1522
|
+
|
1523
|
+
</div>
|
1524
|
+
|
1525
|
+
|
1526
|
+
<div id="next-oken-ord-method" class="method-detail ">
|
1527
|
+
<a name="M001479"></a>
|
1528
|
+
|
1529
|
+
<div class="method-heading">
|
1530
|
+
|
1531
|
+
<span class="method-name">nextTokenWord</span><span
|
1532
|
+
class="method-args">(c)</span>
|
1533
|
+
<span class="method-click-advice">click to toggle source</span>
|
1534
|
+
|
1535
|
+
</div>
|
1536
|
+
|
1537
|
+
<div class="method-description">
|
1538
|
+
|
1539
|
+
<p>
|
1540
|
+
<em>c</em> does not match any start of a control sequence, so we read
|
1541
|
+
characters until we find the end of the word.
|
1542
|
+
</p>
|
1543
|
+
|
1544
|
+
|
1545
|
+
|
1546
|
+
<div class="method-source-code"
|
1547
|
+
id="next-oken-ord-source">
|
1548
|
+
<pre>
|
1549
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 435</span>
|
1550
|
+
435: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextTokenWord</span>(<span class="ruby-identifier">c</span>)
|
1551
|
+
436: <span class="ruby-comment cmt"># Reset this flag again.</span>
|
1552
|
+
437: <span class="ruby-ivar">@ignoreInlineMarkup</span> = <span class="ruby-keyword kw">false</span>
|
1553
|
+
438: <span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
|
1554
|
+
439: <span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1555
|
+
440: <span class="ruby-comment cmt"># Now we can collect characters of a word until we hit a whitespace.</span>
|
1556
|
+
441: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-value str">" \n\t"</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">c</span>)
|
1557
|
+
442: <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@mode</span>
|
1558
|
+
443: <span class="ruby-keyword kw">when</span> <span class="ruby-value">:wiki</span>
|
1559
|
+
444: <span class="ruby-comment cmt"># Or at least two ' characters in a row.</span>
|
1560
|
+
445: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"'"</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">peek</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"'"</span>
|
1561
|
+
446: <span class="ruby-comment cmt"># Or a ] or <</span>
|
1562
|
+
447: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-value str">']<'</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">c</span>)
|
1563
|
+
448: <span class="ruby-keyword kw">when</span> <span class="ruby-value">:href</span>
|
1564
|
+
449: <span class="ruby-comment cmt"># Look for - of the end mark -> end ']'</span>
|
1565
|
+
450: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-value str">'-]<'</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">c</span>)
|
1566
|
+
451: <span class="ruby-keyword kw">else</span>
|
1567
|
+
452: <span class="ruby-comment cmt"># Make sure we find the </nowiki> tag even within a word.</span>
|
1568
|
+
453: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'<'</span>
|
1569
|
+
454: <span class="ruby-keyword kw">end</span>
|
1570
|
+
455: <span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1571
|
+
456: <span class="ruby-keyword kw">end</span>
|
1572
|
+
457: <span class="ruby-comment cmt"># Return the character that indicated the word end.</span>
|
1573
|
+
458: <span class="ruby-identifier">returnChar</span>
|
1574
|
+
459: [ <span class="ruby-value str">'WORD'</span>, <span class="ruby-identifier">str</span> ]
|
1575
|
+
460: <span class="ruby-keyword kw">end</span></pre>
|
1576
|
+
</div>
|
1577
|
+
|
1578
|
+
</div>
|
1579
|
+
|
1580
|
+
|
1581
|
+
|
1582
|
+
|
1583
|
+
</div>
|
1584
|
+
|
1585
|
+
|
1586
|
+
<div id="peek-method" class="method-detail ">
|
1587
|
+
<a name="M001482"></a>
|
1588
|
+
|
1589
|
+
<div class="method-heading">
|
1590
|
+
|
1591
|
+
<span class="method-name">peek</span><span
|
1592
|
+
class="method-args">(lookAhead = 1)</span>
|
1593
|
+
<span class="method-click-advice">click to toggle source</span>
|
1594
|
+
|
1595
|
+
</div>
|
1596
|
+
|
1597
|
+
<div class="method-description">
|
1598
|
+
|
1599
|
+
<p>
|
1600
|
+
Return a character further up the text without moving the cursor.
|
1601
|
+
<em>lookAhead</em> is the number of characters to peek ahead. A value of 0
|
1602
|
+
would return the last character provided by nextChar().
|
1603
|
+
</p>
|
1604
|
+
|
1605
|
+
|
1606
|
+
|
1607
|
+
<div class="method-source-code"
|
1608
|
+
id="peek-source">
|
1609
|
+
<pre>
|
1610
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 510</span>
|
1611
|
+
510: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">peek</span>(<span class="ruby-identifier">lookAhead</span> = <span class="ruby-value">1</span>)
|
1612
|
+
511: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@pos</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">lookAhead</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) <span class="ruby-operator">>=</span> <span class="ruby-ivar">@textLength</span>
|
1613
|
+
512: <span class="ruby-comment cmt"># Since Ruby 1.9 is returning Strings for String#[] we need to emulate</span>
|
1614
|
+
513: <span class="ruby-comment cmt"># this for Ruby 1.8.</span>
|
1615
|
+
514: <span class="ruby-value str">''</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@text</span>[<span class="ruby-ivar">@pos</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">lookAhead</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
|
1616
|
+
515: <span class="ruby-keyword kw">end</span></pre>
|
1617
|
+
</div>
|
1618
|
+
|
1619
|
+
</div>
|
1620
|
+
|
1621
|
+
|
1622
|
+
|
1623
|
+
|
1624
|
+
</div>
|
1625
|
+
|
1626
|
+
|
1627
|
+
<div id="peek-atch-method" class="method-detail ">
|
1628
|
+
<a name="M001483"></a>
|
1629
|
+
|
1630
|
+
<div class="method-heading">
|
1631
|
+
|
1632
|
+
<span class="method-name">peekMatch</span><span
|
1633
|
+
class="method-args">(word)</span>
|
1634
|
+
<span class="method-click-advice">click to toggle source</span>
|
1635
|
+
|
1636
|
+
</div>
|
1637
|
+
|
1638
|
+
<div class="method-description">
|
1639
|
+
|
1640
|
+
<p>
|
1641
|
+
Return true if the next characters match exactly the character sequence in
|
1642
|
+
word.
|
1643
|
+
</p>
|
1644
|
+
|
1645
|
+
|
1646
|
+
|
1647
|
+
<div class="method-source-code"
|
1648
|
+
id="peek-atch-source">
|
1649
|
+
<pre>
|
1650
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 519</span>
|
1651
|
+
519: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">peekMatch</span>(<span class="ruby-identifier">word</span>)
|
1652
|
+
520: <span class="ruby-comment cmt"># Since Ruby 1.9 is returning Strings for String#[] we need to emulate</span>
|
1653
|
+
521: <span class="ruby-comment cmt"># this for Ruby 1.8.</span>
|
1654
|
+
522: (<span class="ruby-value str">''</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@text</span>[<span class="ruby-ivar">@pos</span>, <span class="ruby-identifier">word</span>.<span class="ruby-identifier">length</span>]) <span class="ruby-operator">==</span> <span class="ruby-identifier">word</span>
|
1655
|
+
523: <span class="ruby-keyword kw">end</span></pre>
|
1656
|
+
</div>
|
1657
|
+
|
1658
|
+
</div>
|
1659
|
+
|
1660
|
+
|
1661
|
+
|
1662
|
+
|
1663
|
+
</div>
|
1664
|
+
|
1665
|
+
|
1666
|
+
<div id="read-lanks-method" class="method-detail ">
|
1667
|
+
<a name="M001487"></a>
|
1668
|
+
|
1669
|
+
<div class="method-heading">
|
1670
|
+
|
1671
|
+
<span class="method-name">readBlanks</span><span
|
1672
|
+
class="method-args">(c)</span>
|
1673
|
+
<span class="method-click-advice">click to toggle source</span>
|
1674
|
+
|
1675
|
+
</div>
|
1676
|
+
|
1677
|
+
<div class="method-description">
|
1678
|
+
|
1679
|
+
|
1680
|
+
|
1681
|
+
|
1682
|
+
|
1683
|
+
<div class="method-source-code"
|
1684
|
+
id="read-lanks-source">
|
1685
|
+
<pre>
|
1686
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 573</span>
|
1687
|
+
573: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readBlanks</span>(<span class="ruby-identifier">c</span>)
|
1688
|
+
574: <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
|
1689
|
+
575: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">' '</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"\t"</span>
|
1690
|
+
576: <span class="ruby-identifier">returnChar</span>
|
1691
|
+
577: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1692
|
+
578: <span class="ruby-keyword kw">end</span>
|
1693
|
+
579: <span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>
|
1694
|
+
580: <span class="ruby-keyword kw">end</span>
|
1695
|
+
581: <span class="ruby-keyword kw">end</span></pre>
|
1696
|
+
</div>
|
1697
|
+
|
1698
|
+
</div>
|
1699
|
+
|
1700
|
+
|
1701
|
+
|
1702
|
+
|
1703
|
+
</div>
|
1704
|
+
|
1705
|
+
|
1706
|
+
<div id="read-ode-method" class="method-detail ">
|
1707
|
+
<a name="M001486"></a>
|
1708
|
+
|
1709
|
+
<div class="method-heading">
|
1710
|
+
|
1711
|
+
<span class="method-name">readCode</span><span
|
1712
|
+
class="method-args">()</span>
|
1713
|
+
<span class="method-click-advice">click to toggle source</span>
|
1714
|
+
|
1715
|
+
</div>
|
1716
|
+
|
1717
|
+
<div class="method-description">
|
1718
|
+
|
1719
|
+
<p>
|
1720
|
+
Read a block of pre-formatted text. All lines must start with a space
|
1721
|
+
character.
|
1722
|
+
</p>
|
1723
|
+
|
1724
|
+
|
1725
|
+
|
1726
|
+
<div class="method-source-code"
|
1727
|
+
id="read-ode-source">
|
1728
|
+
<pre>
|
1729
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 552</span>
|
1730
|
+
552: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readCode</span>
|
1731
|
+
553: <span class="ruby-identifier">tok</span> = <span class="ruby-value str">''</span>
|
1732
|
+
554: <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
|
1733
|
+
555: <span class="ruby-comment cmt"># Read until the end of the line</span>
|
1734
|
+
556: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"\n"</span>
|
1735
|
+
557: <span class="ruby-comment cmt"># Append a found characters.</span>
|
1736
|
+
558: <span class="ruby-identifier">tok</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1737
|
+
559: <span class="ruby-keyword kw">end</span>
|
1738
|
+
560: <span class="ruby-comment cmt"># Append the newline.</span>
|
1739
|
+
561: <span class="ruby-identifier">tok</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1740
|
+
562: <span class="ruby-comment cmt"># If the next line does not start with a space, we've reached the end of</span>
|
1741
|
+
563: <span class="ruby-comment cmt"># the code block.</span>
|
1742
|
+
564: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">' '</span>
|
1743
|
+
565: <span class="ruby-keyword kw">break</span>
|
1744
|
+
566: <span class="ruby-keyword kw">end</span>
|
1745
|
+
567: <span class="ruby-keyword kw">end</span>
|
1746
|
+
568: <span class="ruby-identifier">returnChar</span>
|
1747
|
+
569: <span class="ruby-ivar">@beginOfLine</span> = <span class="ruby-keyword kw">true</span>
|
1748
|
+
570: <span class="ruby-identifier">tok</span>
|
1749
|
+
571: <span class="ruby-keyword kw">end</span></pre>
|
1750
|
+
</div>
|
1751
|
+
|
1752
|
+
</div>
|
1753
|
+
|
1754
|
+
|
1755
|
+
|
1756
|
+
|
1757
|
+
</div>
|
1758
|
+
|
1759
|
+
|
1760
|
+
<div id="read-d-method" class="method-detail ">
|
1761
|
+
<a name="M001489"></a>
|
1762
|
+
|
1763
|
+
<div class="method-heading">
|
1764
|
+
|
1765
|
+
<span class="method-name">readId</span><span
|
1766
|
+
class="method-args">(c, tokenType = 'ID')</span>
|
1767
|
+
<span class="method-click-advice">click to toggle source</span>
|
1768
|
+
|
1769
|
+
</div>
|
1770
|
+
|
1771
|
+
<div class="method-description">
|
1772
|
+
|
1773
|
+
|
1774
|
+
|
1775
|
+
|
1776
|
+
|
1777
|
+
<div class="method-source-code"
|
1778
|
+
id="read-d-source">
|
1779
|
+
<pre>
|
1780
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 587</span>
|
1781
|
+
587: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readId</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">tokenType</span> = <span class="ruby-value str">'ID'</span>)
|
1782
|
+
588: <span class="ruby-identifier">token</span> = <span class="ruby-value str">""</span>
|
1783
|
+
589: <span class="ruby-identifier">token</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1784
|
+
590: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>) <span class="ruby-operator">&&</span>
|
1785
|
+
591: ((<span class="ruby-value str">'a'</span><span class="ruby-operator">..</span><span class="ruby-value str">'z'</span>) <span class="ruby-operator">===</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">||</span> (<span class="ruby-value str">'A'</span><span class="ruby-operator">..</span><span class="ruby-value str">'Z'</span>) <span class="ruby-operator">===</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">||</span> (<span class="ruby-value str">'0'</span><span class="ruby-operator">..</span><span class="ruby-value str">'9'</span>) <span class="ruby-operator">===</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">||</span>
|
1786
|
+
592: <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'_'</span>)
|
1787
|
+
593: <span class="ruby-identifier">token</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1788
|
+
594: <span class="ruby-keyword kw">end</span>
|
1789
|
+
595: <span class="ruby-identifier">returnChar</span>
|
1790
|
+
596: <span class="ruby-keyword kw">return</span> [ <span class="ruby-identifier">tokenType</span>, <span class="ruby-identifier">token</span> ]
|
1791
|
+
597: <span class="ruby-keyword kw">end</span></pre>
|
1792
|
+
</div>
|
1793
|
+
|
1794
|
+
</div>
|
1795
|
+
|
1796
|
+
|
1797
|
+
|
1798
|
+
|
1799
|
+
</div>
|
1800
|
+
|
1801
|
+
|
1802
|
+
<div id="read-equence-method" class="method-detail ">
|
1803
|
+
<a name="M001484"></a>
|
1804
|
+
|
1805
|
+
<div class="method-heading">
|
1806
|
+
|
1807
|
+
<span class="method-name">readSequence</span><span
|
1808
|
+
class="method-args">(chars)</span>
|
1809
|
+
<span class="method-click-advice">click to toggle source</span>
|
1810
|
+
|
1811
|
+
</div>
|
1812
|
+
|
1813
|
+
<div class="method-description">
|
1814
|
+
|
1815
|
+
<p>
|
1816
|
+
Read a sequence of characters that are all contained in the <em>chars</em>
|
1817
|
+
Array. If a character is found that is not in <em>chars</em> the method
|
1818
|
+
returns the so far found sequence of chars as <a
|
1819
|
+
href="../String.html">String</a>.
|
1820
|
+
</p>
|
1821
|
+
|
1822
|
+
|
1823
|
+
|
1824
|
+
<div class="method-source-code"
|
1825
|
+
id="read-equence-source">
|
1826
|
+
<pre>
|
1827
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 528</span>
|
1828
|
+
528: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readSequence</span>(<span class="ruby-identifier">chars</span>)
|
1829
|
+
529: <span class="ruby-identifier">sequence</span> = <span class="ruby-value str">''</span>
|
1830
|
+
530: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">chars</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">c</span>)
|
1831
|
+
531: <span class="ruby-identifier">sequence</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1832
|
+
532: <span class="ruby-keyword kw">end</span>
|
1833
|
+
533: <span class="ruby-comment cmt"># Push back the character that did no longer match.</span>
|
1834
|
+
534: <span class="ruby-identifier">returnChar</span>
|
1835
|
+
535: <span class="ruby-identifier">sequence</span>
|
1836
|
+
536: <span class="ruby-keyword kw">end</span></pre>
|
1837
|
+
</div>
|
1838
|
+
|
1839
|
+
</div>
|
1840
|
+
|
1841
|
+
|
1842
|
+
|
1843
|
+
|
1844
|
+
</div>
|
1845
|
+
|
1846
|
+
|
1847
|
+
<div id="read-equence-ax-method" class="method-detail ">
|
1848
|
+
<a name="M001485"></a>
|
1849
|
+
|
1850
|
+
<div class="method-heading">
|
1851
|
+
|
1852
|
+
<span class="method-name">readSequenceMax</span><span
|
1853
|
+
class="method-args">(c, max = 3)</span>
|
1854
|
+
<span class="method-click-advice">click to toggle source</span>
|
1855
|
+
|
1856
|
+
</div>
|
1857
|
+
|
1858
|
+
<div class="method-description">
|
1859
|
+
|
1860
|
+
<p>
|
1861
|
+
Read a sequence of <em>c</em> characters until a different character is
|
1862
|
+
found or <em>max</em> count has been reached.
|
1863
|
+
</p>
|
1864
|
+
|
1865
|
+
|
1866
|
+
|
1867
|
+
<div class="method-source-code"
|
1868
|
+
id="read-equence-ax-source">
|
1869
|
+
<pre>
|
1870
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 540</span>
|
1871
|
+
540: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readSequenceMax</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">max</span> = <span class="ruby-value">3</span>)
|
1872
|
+
541: <span class="ruby-identifier">i</span> = <span class="ruby-value">1</span>
|
1873
|
+
542: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">nextChar</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">i</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">max</span>
|
1874
|
+
543: <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
1875
|
+
544: <span class="ruby-keyword kw">end</span>
|
1876
|
+
545: <span class="ruby-comment cmt"># Return the non matching character.</span>
|
1877
|
+
546: <span class="ruby-identifier">returnChar</span>
|
1878
|
+
547: <span class="ruby-identifier">i</span>
|
1879
|
+
548: <span class="ruby-keyword kw">end</span></pre>
|
1880
|
+
</div>
|
1881
|
+
|
1882
|
+
</div>
|
1883
|
+
|
1884
|
+
|
1885
|
+
|
1886
|
+
|
1887
|
+
</div>
|
1888
|
+
|
1889
|
+
|
1890
|
+
<div id="read-tring-method" class="method-detail ">
|
1891
|
+
<a name="M001490"></a>
|
1892
|
+
|
1893
|
+
<div class="method-heading">
|
1894
|
+
|
1895
|
+
<span class="method-name">readString</span><span
|
1896
|
+
class="method-args">(terminator)</span>
|
1897
|
+
<span class="method-click-advice">click to toggle source</span>
|
1898
|
+
|
1899
|
+
</div>
|
1900
|
+
|
1901
|
+
<div class="method-description">
|
1902
|
+
|
1903
|
+
|
1904
|
+
|
1905
|
+
|
1906
|
+
|
1907
|
+
<div class="method-source-code"
|
1908
|
+
id="read-tring-source">
|
1909
|
+
<pre>
|
1910
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 599</span>
|
1911
|
+
599: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readString</span>(<span class="ruby-identifier">terminator</span>)
|
1912
|
+
600: <span class="ruby-identifier">token</span> = <span class="ruby-value str">""</span>
|
1913
|
+
601: <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">terminator</span>
|
1914
|
+
602: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"\\"</span>
|
1915
|
+
603: <span class="ruby-comment cmt"># Terminators can be used as regular characters when prefixed by a \.</span>
|
1916
|
+
604: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">nextChar</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">terminator</span>
|
1917
|
+
605: <span class="ruby-comment cmt"># \ followed by non-terminator. Just add both.</span>
|
1918
|
+
606: <span class="ruby-identifier">token</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\\"</span>
|
1919
|
+
607: <span class="ruby-keyword kw">end</span>
|
1920
|
+
608: <span class="ruby-keyword kw">end</span>
|
1921
|
+
609: <span class="ruby-identifier">token</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span>
|
1922
|
+
610: <span class="ruby-keyword kw">end</span>
|
1923
|
+
611:
|
1924
|
+
612: [ <span class="ruby-value str">'STRING'</span>, <span class="ruby-identifier">token</span> ]
|
1925
|
+
613: <span class="ruby-keyword kw">end</span></pre>
|
1926
|
+
</div>
|
1927
|
+
|
1928
|
+
</div>
|
1929
|
+
|
1930
|
+
|
1931
|
+
|
1932
|
+
|
1933
|
+
</div>
|
1934
|
+
|
1935
|
+
|
1936
|
+
<div id="return-har-method" class="method-detail ">
|
1937
|
+
<a name="M001481"></a>
|
1938
|
+
|
1939
|
+
<div class="method-heading">
|
1940
|
+
|
1941
|
+
<span class="method-name">returnChar</span><span
|
1942
|
+
class="method-args">(n = 1)</span>
|
1943
|
+
<span class="method-click-advice">click to toggle source</span>
|
1944
|
+
|
1945
|
+
</div>
|
1946
|
+
|
1947
|
+
<div class="method-description">
|
1948
|
+
|
1949
|
+
<p>
|
1950
|
+
Return one or more characters. <em>n</em> is the number of characters to
|
1951
|
+
move back the cursor.
|
1952
|
+
</p>
|
1953
|
+
|
1954
|
+
|
1955
|
+
|
1956
|
+
<div class="method-source-code"
|
1957
|
+
id="return-har-source">
|
1958
|
+
<pre>
|
1959
|
+
<span class="ruby-comment cmt"># File lib/RichTextScanner.rb, line 486</span>
|
1960
|
+
486: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">returnChar</span>(<span class="ruby-identifier">n</span> = <span class="ruby-value">1</span>)
|
1961
|
+
487: <span class="ruby-identifier">crossedNewline</span> = <span class="ruby-keyword kw">false</span>
|
1962
|
+
488: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@pos</span> <span class="ruby-operator"><=</span> <span class="ruby-ivar">@textLength</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@pos</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">n</span>
|
1963
|
+
489: <span class="ruby-comment cmt"># Check for newlines and update @lineNo accordingly.</span>
|
1964
|
+
490: <span class="ruby-identifier">n</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
1965
|
+
491: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@text</span>[<span class="ruby-ivar">@pos</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">\n\</span>
|
1966
|
+
492: <span class="ruby-identifier">crossedNewline</span> = <span class="ruby-keyword kw">true</span>
|
1967
|
+
493: <span class="ruby-ivar">@lineNo</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
|
1968
|
+
494: <span class="ruby-keyword kw">end</span>
|
1969
|
+
495: <span class="ruby-keyword kw">end</span>
|
1970
|
+
496: <span class="ruby-ivar">@pos</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">n</span>
|
1971
|
+
497: <span class="ruby-keyword kw">end</span>
|
1972
|
+
498:
|
1973
|
+
499: <span class="ruby-comment cmt"># If we have crossed a newline during rewind, we have to find the start of</span>
|
1974
|
+
500: <span class="ruby-comment cmt"># the current line again.</span>
|
1975
|
+
501: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">crossedNewline</span>
|
1976
|
+
502: <span class="ruby-ivar">@lineStart</span> = <span class="ruby-ivar">@pos</span>
|
1977
|
+
503: <span class="ruby-ivar">@lineStart</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">while</span> <span class="ruby-ivar">@lineStart</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@text</span>[<span class="ruby-ivar">@lineStart</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value">\n\</span>
|
1978
|
+
504: <span class="ruby-keyword kw">end</span>
|
1979
|
+
505: <span class="ruby-keyword kw">end</span></pre>
|
1980
|
+
</div>
|
1981
|
+
|
1982
|
+
</div>
|
1983
|
+
|
1984
|
+
|
1985
|
+
|
1986
|
+
|
1987
|
+
</div>
|
1988
|
+
|
1989
|
+
|
1990
|
+
</div>
|
1991
|
+
|
1992
|
+
|
1993
|
+
</div>
|
1994
|
+
|
1995
|
+
|
1996
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
1997
|
+
|
1998
|
+
<p>Disabled; run with --debug to generate this.</p>
|
1999
|
+
|
2000
|
+
</div>
|
2001
|
+
|
2002
|
+
<div id="validator-badges">
|
2003
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
2004
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
2005
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
2006
|
+
</div>
|
2007
|
+
|
2008
|
+
</body>
|
2009
|
+
</html>
|
2010
|
+
|