Package Ada95_Lexer

 

Clauses

Quick access : ClausesGenericsDefinitionsSubprograms


 
Context clauses
text_io
ada95_lexer_dfa
ada95_lexer_io
AdaDoc_Tree.Comment# 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. */
/* */
/*------------------------------------------------------------------------*/
Modified for AdaDoc by Vincent Decorges &Julien Burdy
Date : 10.4.02
Note : This version is not anymore compatible with
scaflex use aflex instead
# line 44 "ada95_lexer.l"
***********************************************************
* *
* Ada95_Lexical_Analyzer * SPEC
* *
***********************************************************
Ada95_Parser_Tokens
 
Use clauses
text_io
ada95_lexer_dfa
ada95_lexer_io
Ada95_Parser_Tokens
 

Definitions

Quick access : ClausesGenericsDefinitionsSubprograms


 

Subprograms

Quick access : ClausesGenericsDefinitionsSubprograms


  
Reset procedure
| 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)
Parameter name Type Mode Default
File_NameSTRINGin
  
Close_Files procedure
| 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.
  
YYLex function
ReturnTOKEN
| PURPOSE
| Close the input and output files.
  
Get_Token function
ReturnTOKEN
| PURPOSE
| Return current token
  
Get_Token_Value function
ReturnSTRING
| PURPOSE
| Return current token same as YYlex
  
Get_Current_Line function
ReturnNATURAL
| 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
  
Get_Statistics procedure
| PURPOSE
| Return line on which current token is located
Parameter name Type Mode Default
Number_of_LinesNATURALout