Basics Flashcards

1
Q

the form of expressions, statements, and program units of a programming language

A

Syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

the meaning of the expressions, statements, and program units of a programming language

A

Semantics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

include the numeric literals, operators, and special words of a programming language

A

Lexemes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

a category of the lexemes of a language

A

Token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

reads input strings of the language and decides whether the strings belong to the language.

A

Language recognizer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

creates sentences of a language

A

Language generator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

describes the syntax of programming languages; a collection of rules

A

Grammar

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

describe four (4) classes of generative devices or grammars that define four (4) classes of language. Two of these grammar classes are regular and context-free grammar

A

Noam Chomsky

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

describe the forms of the tokens of the programming languages

A

Regular grammars

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

describe the syntax of whole programming languages

A

Context-free grammars

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

a natural notation for describing syntax developed by John Backus and Peter Naur in the mid-1950s

A

Backus-Naur Form (BNF)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

a language that is used to describe another language

A

Metalanguage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

the abstraction being defined; the text on the left-side of the arrow

A

Left-hand side (LHS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

the definition of LHS; the text to the right of the arrow

A

Right-hand side (RHS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

a mixture of tokens, lexemes, and references to other abstractions

A

Rule (or production)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The abstraction in a BNF description, or grammar, are called

A

nonterminal symbols or nonterminals

17
Q

The lexemes and tokens of the rules are called

A

terminal symbols or terminals

18
Q

A rule is recursive if

A

if its LHS appears in its RHS

19
Q

The sentences of the language are generated through a sequence of applications of the rules, beginning with a special nonterminal of the grammar called the …

This sequence of rule applications is called a …

A
  1. start symbol
  2. derivation
20
Q

Each of the strings in the derivation is called a …

A

sentential form

21
Q

In leftmost derivation, the replaced nonterminal is always the leftmost nonterminal in the sentential form

22
Q

In rightmost derivation, the replaced nonterminal is always the rightmost nonterminal

23
Q

hierarchical syntactic structures of the sentences of the languages

A

Parse trees

24
Q

A grammar is ambiguous if the grammar generates a sentence with more than one (1) leftmost derivation or rightmost derivation

25
When an expression includes two (2) operators that have the same precedence, a semantic rule is required to specify which should have precedence. The rule is named ...
Associativity
26
When a grammar rule has its LHS also appearing at the beginning of its RHS, the rule is said to be ...
left recursive
27
extended versions of BNF that increase the readability and writability of BNF
Extended BNF (or EBNF)
28
What are the three (3) EBNF extensions?
1. Optional parts of an RHS are placed in brackets. 2. Braces are used to indicate that the enclosed part can be repeated indefinitely or left out altogether. 3. When a single element must be chosen from a group, the options are placed in parentheses
29