[SOLVED] CS 441G

$25

File Name: CS_441G.zip
File Size: 65.94 KB

5/5 - (1 vote)

CS 441G
FSA for Pascal Lexemes
This FSA is used to extract the next lexeme from the source file; not to validate the entire source at once.
Drawn as separate FSAs for the sake of convenience, the following diagrams are all one FSA. States repeated on multiple diagrams that are actually the same state are:
o Start
o Haltwithmeaningthatnoerrorwasdetectedandavalidlexemewasfound o ERRwithmeaningthatanerrorwasdetected.
Character Categories Used:
o o #
o W o eol o eof o
o
alphabetics (a..z, A..Z)
digits (0..9)
white space (space, tab).
end of line (newline/line feed, carriage return) end of file
unambiguous single-character symbols: +-/[],;^()
special symbol indicating any other valid character not designated on an out arrow of this state.
Actions: what to do with the character read:
o Add To Current Lexeme (default: not indicated in the diagrams) o Discard (X in a diamond symbol)
o

Put Back (P in a diamond symbol)
Look Ahead:
o LA = x x is the look ahead character category o Default any;notindicatedondiagram

Comments, Leading Whitespace, and EOF:
(no Lexeme found; Halt only on EOF)
Identifiers:
Numeric Literals:
String Literals:
Symbols/Operators:

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS 441G
$25