Chapter 3

18 flashcardsby Lulu
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
What is syntax?
The form or structure of language constructs
2
What is semantics?
The meaning of language constructs
3
What is a lexeme?
The lowest-level syntactic unit of a language
4
What is a token?
A category of lexemes
5
What does BNF stand for?
Backus-Naur Form
6
What is a nonterminal symbol?
A grammar symbol that requires further expansion
7
What is a terminal symbol?
A grammar symbol that appears in the final sentence
8
What is a production rule?
A rule describing how a nonterminal can be expanded
9
What is a start symbol?
The nonterminal where derivation begins
10
What is a derivation?
A sequence of rule applications beginning with the start symbol
11
What is a parse tree?
A hierarchical representation of a derivation
12
When is a grammar ambiguous?
When a sentence has two or more distinct parse trees
13
What are the three EBNF extensions?
Optional constructs, repetition, and alternatives
14
What do brackets [ ] represent in EBNF?
Optional constructs
15
What do braces { } represent in EBNF?
Repetition
16
What do parentheses with | represent in EBNF?
Alternatives
17
What is static semantics?
Rules that describe legal program forms beyond CFG syntax
18
What is an attribute grammar?
A CFG extended with attributes and semantic rules
Study all 18 cards for free