Lexical Analysis Flashcards

1
Q

What does lexical analysis do?

A

Reads characters and produces sequences of tokens

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

How are lexical analysers automatically generated from regular expressions?

A
  1. Construct RE
  2. Convert RE to NFA
  3. Build DFA from NFA
  4. Minimise DFA
  5. Convert DFA to Transition Table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What kind of Language can a Regular Expression describe?

A

A Regular Language

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

How might we represent a DFA in memory?

A

Using a Transition Table

This contains all the states and their transitions

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