|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 3450 (0xd7a)
Types: TextFile
Names: »V«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
with Source_Instrumenter_Declarations;
use Source_Instrumenter_Declarations;
with Parserdeclarations;
package Change_Text is
--| Subprograms for the manipulation of source text
--| Overview
--| This package provides several subprograms which manipulate source text
--| in various ways.
--|
--| Change_Case alters the case of the text passed in,
--| Change_Sharp changes the extended delimiter character '#' to the basic
--| character ':' in the text of a based literal.
--| String_Value returns the text of a string with the extended and basic
--| string delimiters represented appropriately within the string.
package Pd renames Parserdeclarations;
type Case_Name is (Uppercase, Lowercase);
-----------------------------------------------------------------------
function Change_Case (Token_Text : Pd.Source_Text; --| text to be changed
To_Case : Case_Name --| case in which to
--| represent Token_Text
) return String;
--| Changes the case of Token_Text
--| Effects
--| The Token_Text is changed according to the To_Case passed in. When
--| To_Case is SID.Bold, the return value is the same as if lowercase
--| had been requested. The actual bold printing is handled in procedure
--| Bold_Print rather than here for two reasons:
--|
--| 1. Tokens which would ordinarily be bold printed should be only
--| lowercased when bold printing is selected with
--| Paginated_Format off. This is to prevent control characters
--| from being inserted into a file which is supposed to be
--| valid Ada.
--|
--| 2. In determining the length of a token for placement in the
--| output, control characters which have no printable form,
--| and therefore do not take up any columns on the page, should
--| not be counted.
--|
-----------------------------------------------------------------------
function Change_Sharp (Token_Text : Pd.Source_Text) return String;
--| Changes the extended character '#' to the basic character ':'
--| Effects
--| This function changes all of the '#' characters in the passed-in
--| Token_Text to ':' characters. Its primary use should be for changing
--| these characters in the text of a based literal.
-----------------------------------------------------------------------
function String_Value (Token_Text : Pd.Source_Text) return String;
--| Returns the correct text for a string, based on its delimiters
--| Effects
--| This function returns a string with the correct delimiters (basic
--| or extended) and embedded delimiter characters represented correctly.
--| For example, the input string "Here is a % character" when output
--| with Basic Delimiters must be converted to %Here is a %% character"
--| with the embedded delimiter character doubled. This ensures that
--| valid Ada strings are reproduced.
-----------------------------------------------------------------------
function Convert_Periods_To_Underscores
(Input_String : in String) return String;
--| Effects
--|
--| This procedure will convert all periods in a string to underscores.
end Change_Text;