Prog Lang Final Exam Flashcards

1
Q

Lexical Structure of Programming Languages

A

Deals with tokens, the smallest meaningful units in a program (e.g. keywords, literals, symbols).

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

Categories of Tokens

A
  • Reserved words
  • Literals/constants
  • Special symbols
  • Identifiers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Three Basic Patterns of Characters

A
  • Concatenation: Sequence of items
  • Repetition: Denoted by *
  • Choice/Selection: Denoted by |
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Tokenization

A
  • Breaks down source code into tokens
  • Removes unncessary whitespaces and comments
  • Detects lexical errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Building Parse Trees/ASTs

A
  • Parse trees represent complete grammar structure
  • Abstract syntax trees abstract away unncessary details for further processing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Checking Syntax

A

Verifies code conforms to grammar rules

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

Error Recovery

A

Attemps to handle syntax errors gracefully to continue parsing

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

Parsing Phase

A
  • Building parse trees/ASTs
  • Checking syntax
  • Error recovery
How well did you know this?
1
Not at all
2
3
4
5
Perfectly