-- A lexical scanner generated by aflex
with text_io; use text_io;
with ada95_lexer_dfa; use ada95_lexer_dfa;
with ada95_lexer_io; use ada95_lexer_io;
--# line 1 "ada95_lexer.l"
----------------------------------------------------------------------------
--                  written for use with aflex
----------------------------------------------------------------------------
--/*------------------------------------------------------------------------*/
--/* Lexical input for AFLEX for LALR(1) Grammar for ANSI Ada95             */
--/*                                                                        */
--/*               Dean R. Runzel                                           */
--/*      Monmouth College, West Long Branch, NJ                            */
--/*               February 16, 1995                                        */
--/*                                                                        */
--/* Accompanies Public Domain AYACC format Ada95 grammar                   */
--/*                                                                        */
--/* This work is based upon previous work performed by:                    */
--/*                                                                        */
--/* Herman Fischer  Litton Data Systems  1984                              */
--/* C. Schaefer                          1991                              */
--/* C. Howell                            1991                              */
--/* Richard Conn    Mitre, Inc.          1993                              */
--/*                 Intermetrics, Inc.   1994                              */
--/*                                                                        */
--/* This work is copyrighted by the author.                                */
--/*                                                                        */
--/* Please see the Parse95 reader for the complete text of all copyrights  */
--/* and acknowledgements.                                                  */
--/*                                                                        */
--/*------------------------------------------------------------------------*/
--# line 41 "ada95_lexer.l"


-- ***********************************************************
-- *                                                         *
-- * Ada95_Lexical_Analyzer                                  * SPEC
-- *                                                         *
-- ***********************************************************
with AdaDoc_Tree.Comment;
package Ada95_Lexer is
--| PURPOSE
--| Analyze a stream of characters for tokens, producing a stream of
--| tokens as a result.  The input stream is obtained through Text_IO.
--| The output stream is obtained by the user of this package through
--| successive calls to Get_Token.
--|
--| AUTHOR AND REVISION HISTORY:
--| Version  Date        Author             Notes
--|   1.0    12 Nov 93   Richard Conn       Initial release
--|   1.1     6 Mar 95   Dean Runzel        Change package name and correct
--|                                         identifier errors
--|   1.2     3 Apr 97   Richard Conn       Modify for SCATC Kit
--|   1.3     9 Apr 02   Vincent Decorges   Modify name for AdaDoc
--| NOTES:
--| The sequence of invocation of the methods in this package is:
--|     Reset - initialize analyzer and open input file
--|     Get_Token -- as desired until END_OF_INPUT is returned
--|     Get_Token_Value -- as desired (returns string of token)

  type TOKEN is
      (End_Of_Input, Error, '&', ''',
       '(', ')', '*',
       '+', ',', '-',
       '.', '/', ':',
       ';', '<', '=',
       '>', '|', Arrow,
       Double_Dot, Double_Star, Assignment,
       Inequality, Greater_Than_Or_Equal, Less_Than_Or_Equal,
       Left_Label_Bracket, Right_Label_Bracket, Box,
       Abort_Token, Abs_Token, Abstract_Token,
       Accept_Token, Access_Token, Aliased_Token,
       All_Token, And_Token, Array_Token,
       At_Token, Begin_Token, Body_Token,
       Bogus_Token, Case_Token, Constant_Token,
       Declare_Token, Delay_Token, Delta_Token,
       Digits_Token, Do_Token, Else_Token,
       Elsif_Token, End_Token, Entry_Token,
       Exception_Token, Exit_Token, For_Token,
       Function_Token, Generic_Token, Goto_Token,
       If_Token, In_Token, Is_Token,
       Limited_Token, Loop_Token, Mod_Token,
       New_Token, Not_Token, Null_Token,
       Of_Token, Or_Token, Others_Token,
       Out_Token, Package_Token, Pragma_Token,
       Private_Token, Procedure_Token, Protected_Token,
       Raise_Token, Range_Token, Record_Token,
       Rem_Token, Renames_Token, Requeue_Token,
       Return_Token, Reverse_Token, Select_Token,
       Separate_Token, Subtype_Token, Tagged_Token,
       Task_Token, Terminate_Token, Then_Token,
       Type_Token, Until_Token, Use_Token,
       When_Token, While_Token, With_Token,
       Xor_Token, Base, Based_Literal,
       Decimal_Literal, Digit, Extended_Digit,
       Exponent, Identifier,
-- Integer,
       Char_Literal, String_Literal );

  procedure Reset (File_Name : in STRING);
  --| PURPOSE
  --| Zero line number count for current file and update total line
  --| count for all files.  Reset key variables for current file.
  --| Open input and output files.

  procedure Close_Files;
  --| PURPOSE
  --| Close the input and output files.

  function Get_Token return TOKEN;
  --| PURPOSE
  --| Return current token

  function Get_Token_Value return STRING;
  --| PURPOSE
  --| Return value associated with current token (e.g., if current
  --| token is an identifier, this is the name of the identifier);
  --| "Current token" is the last token returned by a call to
  --| Get_Token

  function Get_Current_Line return NATURAL;
  --| PURPOSE
  --| Return line on which current token is located

  procedure Get_Statistics (Number_of_Lines : out NATURAL);
  --| PURPOSE
  --| Return statistics on the last file processed.  These
  --| counters are reset by a call to Reset.  This
  --| routine should be called after the parse is complete.

end Ada95_Lexer;
