Using C C Note Problem Designed Show Dfa Pda Used Compilers Dfa Used Finding Tokens Proble Q37206369

USING C++ or C , Note: This problem is designed to show you howDFA and PDA are used in Compilers. DFA is used for finding thetokens (Problem 1) and PDA for syntax (Problem 2

Part I – We have the following input file: (for foreign studentsthe name here are of well know comics)

larry = 27

curly = 19

moe  = 8

groucho = 11

harpo = larry+curly

harpo = larry-curly

harpo = larry*curly

harpo = larry/curly

harpo = larry*curly+moe*groucho

We need to define a DFA which will give the output varioustokens. In this case, the identifiers will be larry, curly, moe ,groucho , and harpo. The operators will be /, +,

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.