Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-sxzjt Total loading time: 0 Render date: 2024-04-23T18:10:09.765Z Has data issue: false hasContentIssue false

5 - Lexical Style

Published online by Cambridge University Press:  05 July 2014

Get access

Summary

In the previous chapters, we introduced some concepts of Ada and illustrated the general appearance of Ada programs with some simple examples. However, we have so far only talked around the subject. In this chapter we get down to serious detail.

Regrettably it seems best to start with some rather unexciting but essential material – the detailed construction of things such as identifiers and numbers which make up the text of a program. However, it is no good learning a human language without getting the spelling sorted out. And as far as programming languages are concerned, compilers are usually very unforgiving regarding such corresponding and apparently trivial matters.

We also take the opportunity to introduce the notation used to describe the syntax of Ada. In general we will not use this syntax notation to introduce concepts but, in some cases, it is the easiest way to do so. Moreover, if the reader wishes to consult the ARM then knowledge of the syntax notation is necessary. For completeness and easy reference the full syntax is given in Appendix 3.

Syntax notation

The syntax of Ada is described using a variant of Backus-Naur Form (BNF). In this notation, syntactic categories are represented by lower case names; some of these contain embedded underlines to increase readability. A category is defined in terms of other categories by a sort of equation known as a production. Some categories are atomic and cannot be decomposed further – these are known as terminal symbols.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2014

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Lexical Style
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.010
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Lexical Style
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.010
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Lexical Style
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.010
Available formats
×