About...
Ada Home
Site Guide
Welcome Tour
Online RM95
Ada FAQs

Follow this link to learn more about DocAda
DocAda: The Ada 95 Hypertext Reference Works for Serious Programmers.

Ada Home Floors: Resources | Marketplace | Ammunition Dept. | Discovery Tour | Network

Resources for Ada

References

FTP Warning: Some items listed here are accessed through FTP.
Happy hyper-referencing.

Ada Grammar and Parsing

Syntax Summary
Syntactic diagrams [@UniGe]

yacc Grammar

The Ada 9X design team has written, and used, a YACC-compatible grammar for Ada 9X [@AdaIC]. (It should be accurate as of May 4, 1994.) If you find any problems with this grammar, please send email to Tucker Taft, stt@inmet.com

Here are some remarks on the grammar:

"The grammar is a bit "permissive," to simplify making it LALR(1), and semantic actions would be required to enforce certain "syntax" rules. But the differences are quite minor, and could mostly be eliminated even while remaining LALR(1). It is certainly adequate for "quick" syntax checkers, compilation order determination, and most other similar tools.

"As an example of its permissiveness, the grammar allows "aliased constant" in an object renaming declaration, but in fact the Ada9X syntax rules do not (these properties are inherited and not overridable in a renaming). This could be fixed at the expense of adding another nonterminal or two to the grammar. However, it is often better to make a grammar a bit permissive anyway, and check things in the semantic actions, as more helpful error messages can usually be produced in that way."

lex Grammar and Driver

The Ada 9X design team has also written a very simple lexer and driver routine [@AdaIC] to go with this grammar.

"It is designed to be used with "lex" -- the included driver code is written in C (Gasp ;-). The lexer is a bit simple-minded, but it works correctly for all but the most obscure cases involving strings of apostrophes in weird combinations."

Syntax Summary

Included in our hypertext version of RM95, you can browse the online Ada 95 syntax summary (Annex P).

Syntactic Diagrams

Members of the Database Research Group at the University of Geneva have produced a very nice set of documents describing the syntax rules of Ada 95 illustrated by syntactic diagrams, with cross-references.

Resources | Marketplace | Ammunition | Discovery | Network
About... | Ada Home | Site Guide | Welcome Tour | Tutorials
Book Reviews | RM95 | FAQs | References | Compilers | Tools | Bindings
Bookshop | Job Center | Consultants Index | Vendors
Copyright © by Kempe Software Capital Enterprises (KSCE). All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of KSCE is strictly prohibited. Ada Home and Home of the Brave Ada Programmers are trademarks of KSCE. Back to the main entrance of the Ada Home
Ada Home
Improvement makes strait roads; but the crooked roads without improvement are roads of Genius. —William Blake

Page last modified: 1998-12-20