HW 2 Reading Flashcards
Syntax Rules of a Languages
Specify which strings of characters from the language’s alphabet are in the language.
Token of a Language
A category of it lexemes.
Lexemes
Lowest level syntactic units
What two ways can languages be formed?
Recognition and Generation
Lexical Analyzer
Pattern Matcher
What type of names did the earliest programming languages use?
Single-character names
What must all variables names in PHP start with?
$
Precision
Accuracy of the
fractional part of a value
Range
A combination of the range of fractions and, more important, the range of exponents.
Selection Statements
Provides the means of choosing between two or more execution paths in a program.
Types of Selection Statements
1.) Two-Way Selection Statements
2.) Multiple-Selection Statements
Two-Way Selection Statements
if control_expression
then clause
else clause
Two-Way Selection Statements Design Issues
1.) What is the form and type of the expression that controls the selection?
2.) How are the then and else clauses specified?
3.) How should the meaning of nested selectors be specified?
Subprogram Header
Specifies that the following syntactic unit is a subprogram definition of some particular kind
Parameter Profile
Contains the number, order, and
types of its formal parameters
Protocol of Subprogram`
Parameter profile plus, if it is a function, its return type.
Activation Record
The format, or layout, of the noncode part of a subprogram
Activation Record Instance
Example of an activation
record, a collection of data in the form of an activation record.