
----------------------------------------------------------------------

with Host_Dependencies;  -- host dependent constants

package Lexical_Error_Message is
    --| handles lexical error messages

    --| Overview
    --|
    --| Contains text, identifiers of text, and output subprograms
    --| for package Lex.
    --|

    package Hd renames Host_Dependencies;

    --------------------------------------------------------------
    -- Declarations Global to Package Lexical_Error_Message
    ------------------------------------------------------------------

    type Message_Type is
       (Base_Out_Of_Legal_Range_Use_16, Based_Literal_Delimiter_Mismatch,
        Character_Can_Not_Start_Token, Character_Is_Non_Ascii,
        Character_Is_Non_Graphic, Consecutive_Underlines,
        Digit_Invalid_For_Base, Digit_Needed_After_Radix_Point,
        Digit_Needed_Before_Radix_Point, Exponent_Missing_Integer_Field,
        Illegal_Use_Of_Single_Quote, Integer_Literal_Conversion_Exception_Use_1,
        Leading_Underline, Missing_Second_Based_Literal_Delimiter,
        Negative_Exponent_Illegal_In_Integer, No_Ending_String_Delimiter,
        No_Integer_In_Based_Number, Only_Graphic_Characters_In_Strings,
        Real_Literal_Conversion_Exception_Use_1, Source_Line_Maximum_Exceeded,
        Source_Line_Too_Long, Space_Must_Separate_Num_And_Ids,
        Terminal_Underline, Too_Many_Radix_Points);

    --------------------------------------------------------------
    -- Subprogram Bodies Global to Package Lexical_Error_Message
    --------------------------------------------------------------

    procedure Output_Message ( --| output lexical error message
                              In_Line : in Hd.Source_Line;
                              --| line number of error.
                              In_Column : in Hd.Source_Column;
                              --| column number of error.
                              In_Message_Id : in Message_Type);
    --| which message to output.

    --| Effects
    --|
    --| Output error message for lexer.
    --|

    ------------------------------------------------------------------

    procedure Output_Message
                 ( --| output lexical error message
                  In_Line : in Hd.Source_Line;
                  --| line number of error.
                  In_Column : in Hd.Source_Column;
                  --| column number of error.
                  In_Insertion_Text : in String;     --| text to insert.
                  In_Message_Id : in Message_Type);
    --| which message to output.

    --| Effects
    --|
    --| Output error message with inserted text.  The text is appended
    --| to the message if there are no insertion flags.

    ------------------------------------------------------------------

end Lexical_Error_Message;

----------------------------------------------------------------------