CSE 3302 Exam 3 vocab

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/54

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

55 Terms

1
New cards

Syntax

The structure of a language

2
New cards

Important

Every modern computer scientist needs to know how to read, interpret, and apply BNF descriptions of language syntax

3
New cards

Lexical structure


the structure of the tokens, or words, of a language

4
New cards

Scanning phase


the phase in which a translator collects sequences of characters from the input program and forms them into tokens

5
New cards

Parsing phase

the phase in which the translator processes the tokens, determining the program's syntactic structure

6
New cards

Tokens generally fall into several cotegories

Reserved words (or keywords

Literals or constants

Special symbols, such as “;”m”<=”, or “+”

Identifiers

7
New cards

Principle of longest substring

process of collecting the longest possible string of nonblank characters

8
New cards

Token delimiters (or white space)

formatting that affects the way tokens are recognized

9
New cards

Three basic patterns of characters in regular expressions

-Concatenation: done by sequencing the items

-Repetition: indicated by an asterisk after the item to be repeated

-Choice, or selection: indicated by a vertical bar between items to be selected

10
New cards

Productions

another name for grammar rules

11
New cards

Backus-Naur form

uses only the metasymbols "->" and "|"

12
New cards

Start symbol

a nonterminal representing the entire top-level phrase being defined

13
New cards

Nonterminals

names for phrase structures, since they are broken down into further phrase structures

14
New cards

Parse tree

graphical depiction of the replacement process in a derivation

15
New cards

Nodes

Have at least one child are labeled with nonterminals

16
New cards

Leaves

(nodes with no children) are labeled with terminals

17
New cards

Abstract syntax trees (or syntax trees)

trees that abstract the essential structure of the parse tree

18
New cards

Ambiguous grammar

one for which two distinct parse or syntax trees are possible

19
New cards

Leftmost derivation

the leftmost remaining nonterminal is singled out for replacement at each step

20
New cards

Recognizer

accepts or rejects strings based on whether they are legal strings in the language

21
New cards

Bottom-up parser

constructs derivations and parse trees from the leaves to the roots

-Matches an input with right side of a rule and reduces it to the nonterminal on the left

22
New cards

Top-down parser

expands nonterminals to match incoming tokens and directly construct a derivation

23
New cards

Parser generator


a program that automates top-down or bottom-up parsing

24
New cards

Top-down parser

expands nonterminals to match incoming tokens and directly construct a derivation

25
New cards

Parser generator

a program that automates top-down or bottom-up parsing(EBNF)

26
New cards

Recursive-descent parsing

turns nonterminals into a group of mutually recursive procedures based on the right-hand sides of the BNFs

27
New cards

YACC

A widely used parser generator

  • Freeware version is called Bison

  • Generates a C program that uses a bottom-up algorithm to parse the grammar

Generates a procedure yypars(EBNF) from the grammar, which must be called from a main procedure

Assumes that tokens are recognized by a scanner procedure called yylex (Regex→Tokens), which must be provided

28
New cards

Names (or identifiers)

a fundamental abstraction mechanism used to denote language entities or constructs

29
New cards

Location

place where value can be stored; usually a relative location

30
New cards

Attributes

properties that determine the meaning of the name to which they are associated

31
New cards

Binding

process of associating an attribute with a name

32
New cards

Binding time

the time when an attribute is computed and bound to a name

33
New cards

Static binding

aoccurs prior to execution

34
New cards

Dynamic binding

occurs during execution

35
New cards

Static attribute

an attribute that is bound statically; can be bound during translation, during linking, or during loading of the program

36
New cards

Dynamic attribute

an attribute that is bound dynamically; can be bound at different times during execution, such as entry or exit from a procedure or from the program

37
New cards

Lexical analysis

determines whether a string of characters represents a token (scanning)

38
New cards

Syntax analysis

determines whether a sequence of tokens represents a phrase in the context-free grammar

39
New cards

Static semantic analysis

establishes attributes of names in declarations and ensures that the use of these names conforms to their declared attributes

40
New cards

Definition

in C and C++, a declaration that binds all potential attributes

41
New cards

Prototype

function declaration that specifies the data type but not the code to implement it

42
New cards

Block

a sequence of declarations followed by a sequence of statements

43
New cards

Compound statements

blocks in C that appear as the body of functions or anywhere an ordinary program statement could appear

44
New cards

Local declarations

associated with a block; selected (“that”)

45
New cards

Nonlocal declarations

associated with surrounding blocks

46
New cards

Scope of a binding

region of the program over which the binding is maintained

(region where the name is meaningful)

47
New cards

Symbol table

Must support insertion, lookup, and deletion of names with associated attributes, representing bindings in declarations

48
New cards

scope analysis

-On block entry, all declarations of that block are processed and bindings added to symbol table

-On block exit, bindings are removed, restoring any previous bindings that may have existed

49
New cards

Overload resolution

process of choosing a unique function among many with the same name

50
New cards

Activation

a call to a function (Block)

51
New cards

Activation record

the corresponding region of allocated memory (stack frame)

52
New cards

Pointer

an object whose stored value is a reference to another object (address)

53
New cards

Heap

locations can be allocated in response to calls to new

54
New cards

Dynamic allocation


allocation on the heap

55
New cards