armstrongnate / school

school code, assignments, and notes.
0 stars 1 forks source link

Program 2 #2

Closed armstrongnate closed 9 years ago

armstrongnate commented 9 years ago

Do problems 1-5 at the end of the Scanner chapter. http://cit.dixie.edu/cs/4550/programs/p2.htm

 MachineState mLegalMoves[LAST_STATE][LAST_CHAR]

language | S | A | B

x | A | A | S y | S | A | B z | S | B | CANT_MOVE

Start by setting them all to CANT_MOVE then go back and fill out the legal edges.

This array ties token types and states:

TokenType mCorrespondingTokenTypes[LAST_STATE]

Initialize it with BAD_TOKEN Token Types. Not all machine states have a corresponding token type.

armstrongnate commented 9 years ago

Include image of finite automata in pull request.