1 / 9

Chapter 3 Language Translation Issues

Chapter 3 Language Translation Issues . Programming Languages Pratt. Programming Syntax. During the early days of language design (1960), they believed that a formal syntax is all that is required. Backus-Naur form (BNF) Context-free grammer

grant-good
Download Presentation

Chapter 3 Language Translation Issues

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 3Language Translation Issues Programming Languages Pratt

  2. Programming Syntax • During the early days of language design (1960), they believed that a formal syntax is all that is required. • Backus-Naur form (BNF) • Context-free grammer • Syntax: the arrangement of words as elements in a sentence to show their relationship. • The sequence of symbols that make up valid programs.

  3. Syntax is not enough, semantics are needed too. • Use of declarations, operations,sequence control, and referencing environments, affect a variable, not always determined by syntax.

  4. General Syntactic Criteria • The primary purpose: provide a notation for communication between the programmer and the programming language processor.

  5. The Criteria • Readability • Writeability • Ease of verifiability • Ease of translation • Lack of ambiguity

  6. Syntactic Elements of a Language • Character set • Identifiers • Operator symbols • Keywords and reserved word • Noise words • Comments

  7. Syntactic Elements of a Language • Blanks • Delimiters and brackets • Free- and fixed- field formats • Expressions • Statements

  8. Overall Program-subprogram Structure • Separate subprogram definitions • Separate data definitions • Nested subprogram definitions • Separate interface definitions • Data descriptions separated from executable from executable statements • Unseparated subprogram definitions

  9. What do you know about Compiling? • Lexical analysis • syntactic analysis • semantic analysis • optimization • code generation • linking, loading

More Related