Chapter 3 – Describing Syntax and Semantics
!" #
Chapter 3 ? Describing Syntax and Semantics
CS-4337 Organization of Programming Languages
Dr. Chris Irwin Davis
Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705
Chapter 3 Topics
? Introduction ? The General Problem of Describing Syntax ? Formal Methods of Describing Syntax ? Attribute Grammars ? Describing the Meanings of Programs:
Dynamic Semantics
1-2
Introduction
?Syntax: the form or structure of the expressions, statements, and program units
?Semantics: the meaning of the expressions, statements, and program units
?Syntax and semantics provide a language's definition
? Users of a language definition
?Other language designers ?Implementers ?Programmers (the users of the language)
1-3
The General Problem of Describing Syntax: Terminology
?A sentence is a string of characters over some alphabet
?A language is a set of sentences ?A lexeme is the lowest level syntactic unit of a
language (e.g., *, sum, begin) ?A token is a category of lexemes (e.g.,
identifier)
1-4
Example: Lexemes and Tokens
index = 2 * count + 17
Lexemes
Tokens
index = 2 * count + 17 ;
identifier equal_sign int_literal mult_op identifier plus_op int_literal semicolon
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- chapter 3 developmental psychology quizlet
- mcgraw hill algebra1 chapter 3 lesson 8
- chapter 3 psychology quizlet test
- psychology chapter 3 quiz answers
- chapter 3 network and computer attacks
- chapter 3 cell structure and function answers
- chapter 3 sensation and perception
- chapter 3 cellular structure and function key
- chapter 3 questions and answers
- chapter 3 cell structure and function quizlet
- chapter 4 describing populations concept mapping
- course 3 chapter 3 equations in two variables