lang quiz 2 Flashcards

(26 cards)

1
Q

Alogl68

A

insane orthogonality

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

Pascal

A

teaching language

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

C

A

originally a sys language. Many operators poor type checking

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

smalltalk

A

first OOP plus had built in gui

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

C++

A

added OOP to C

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

syntax

A

The form or structure oft he expressions, statements, and program units

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

semantics

A

The meaning of the expressions, statements, and program units

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

lexical analysis

A

converts characters in the source program into lexical units (tokens)

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

token

A

syntactic family that forms a class of units (literal key word, operator)

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

lexeme

A

the actual sequence of characters in the token, terminal

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

meta lang

A

language used to describe other languages

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

grammar

A

A meta-language used to define the syntax of a language

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

recognizer

A

can verify if a sentence contains valid syntax for the language

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

generator

A

generates a random syntactically valid sentence

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

sentential form vs sentence

A

sentential form is any line in a derivation but a sentence is the final line with just terminals

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

an ambiguous grammar has

A

multiple potential parse trees for the same sentence

17
Q

static type binding types

A

explicit (C++) Implied (fortran) inferencing (C++)

18
Q

dynamic type binding

A

Python and JS more expensive

19
Q

lifetime of a var

A

time it is bound to a particular memory cell

20
Q

static variables

A

exist at compile time. Never added to nor die. efficient, globally accessible, history sensitive subprogram support. Does not allow for recursion or sharing memory.

21
Q

stack dynamic

A

variables created when elaborated. allows recursion, conserves storage, however subprograms not history-sensitive, indirect addressing, increased allocate and deallocate over head

22
Q

explicit heap dynamic

A

programmer explicitly allocates and deallocates. allows for dynamic storage management, can be error prone and needs a complex management solution

23
Q

implicit heap dynamic

A

maximum flexibility but also inefficient because all attributes are re-assigned arrays and strings in JS

24
Q

scope

A

where is it visible and who is it visible to

25
static (lexical )scoping
the normal scope. Human readable. disadvantage is we lose control as a variable is often visible in places we don't want it to be or we have to massacre the code
26
dynamic scoping
trace the subprogram calls. pretty much disappeared except for error handling