Determine if a token is a reserved word in Ada
Date/Time of Processing: Monday 30 May 1994 06:13:46Pm Overall Assessment of System: OK Classification of System: A Basis of Classification -- Syntax Errors PASS Completeness PASS Independence from External Libraries PASS Independence from a Specific Ada Compiler PASS Number of ... Files 2 Library Units 2 Lines 428 Statements 115 Comments 100
languages/ada/asr/components/reserve: File Name Size --------- ---- reserve.zip 9,772 Totals ============== ============== 1 Files 9,772
This package contains the single function "is_Ada_reserved_word". It returns with either a "true" or "false" to the statement "the input character string is a reserved word in the Ada language". The contribution of the function is that it executes very quickly, being an implementation of the algorithm defined by David Wolverton in "A Perfect Hash Function for Ada Reserved Words", as published in Ada Letter, July-August 1984. It is much faster than either linear or binary searches of all the Ada reserved words. A test driver is included, as is sample test data.
DATE VERSION AUTHOR HISTORY 1/29/86 1.0 Gralia & Kashtan Initial Release
This prologue must be included in all copies of this software. This software is copyright by the authors. This software is released to the Ada community. Restrictions on use or distribution: NONE
This software and its documentation are provided "AS IS" and without any expressed or implied warranties whatsoever. No warranties as to performance, merchantability, or fitness for a particular purpose exist. The user is advised to test the software thoroughly before relying on it. The user must assume the entire risk and liability of using this software. In no event shall any person or organization of people be held responsible for any direct, indirect, consequential or inconsequential damages or lost profits.