Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
22 Cards in this Set
- Front
- Back
- 3rd side (hint)
syntax |
the form of a programming language's expressions, statements, and program units. |
|
|
semantics |
meaning of a programming language's expressions, statements, and program units. |
|
|
what are lexemes? |
lowest level syntactic unit. include a languages numeric literals, operators, and special words, etc. |
can think of programs as strings of these rather than of characters. *, -, +
|
|
what is a token? |
a category of a language's lexemes. |
methods, classes, names of variables, ie identifier equal_sign etc |
|
language generator/compiler |
a device that can be used to generate sentences of a language |
|
|
grammars |
formal language generation mechanisms |
|
|
BNF ( Backus-Naur Form) |
most popular method of describing programming language syntax. Used for context free grammars. |
|
|
metalanguage |
a language used to describe another language. |
|
|
abstractions in a BNF description are known as this |
nonterminal symbols, or nonterminals |
, |
|
Lexemes and tokens within a BNF description/grammar are known as this |
terminal symbols/terminals within a BNF description |
*, + , = etc |
|
sentential form |
each of the strings in the BNF derivation |
|
|
ambiguous grammar |
a grammar that generates a sentential form for which there are two or more distinct parse trees |
|
|
Parse-trees |
alternate form of (E)BNF notation to capture the hierarchical structure of a sentence |
|
|
EBNF ( Extended Backus-Naur Form ) |
Form of grammar that makes descriptions of languages more readable |
{ } //0 or more , [ ] // optional, and ( ) // for grouping |
|
attribute grammar |
an extension of a context-free grammar to describe more of a P.L's structure describe both syntax and semantics |
|
|
Chomsky's categories |
Type 3 - regular lang. Type 2 - context-free Type 1 - context-sensitive Type 0 - recursively-enumerable |
they are subsets of the type before it 3 subset of 2 subset of 1 etc. |
|
Regular Languages |
a language that is described using finite-automatons |
Type 3 |
|
Context-free Languages |
a language that can be described using push-down automatons |
Type 2 |
|
Context-sensitive Languages |
linear bounded automata |
Type 1 |
|
recursively enumerable languages |
a language that can be described using turing machines |
Type 0 |
|
Context-free grammars |
type of metalanguage best suited used to describe just the syntax of a PL. |
|
|
what are the 3 approaches to defining language semantics |
operational, axiomatic, denotational |
|