08: #1 2 #3 NA #5 #6 #7 #8 Consider the simple BNF granmar for integral numbers shown below. Cexpr> Cint> (op> | <

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

08: #1 2 #3 NA #5 #6 #7 #8 Consider the simple BNF granmar for integral numbers shown below. Cexpr> Cint> (op> | <

Post by answerhappygod »

08 1 2 3 Na 5 6 7 8 Consider The Simple Bnf Granmar For Integral Numbers Shown Below Cexpr Cint Op Int 1
08 1 2 3 Na 5 6 7 8 Consider The Simple Bnf Granmar For Integral Numbers Shown Below Cexpr Cint Op Int 1 (81.75 KiB) Viewed 32 times
08: #1 2 #3 NA #5 #6 #7 #8 Consider the simple BNF granmar for integral numbers shown below. Cexpr> Cint> (op> <int> | <int> <op> <expr> cint> -> <number> | <sign> <number> Cop> <sign Cnumber) -> (any-digit> | <pos-digit> <digita> <digits> > Cany-digit> | <any digit> <digits> Cany-digit> > <pos digit> pos-digit> -> 1 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 (a) Explain which of rules #1-8 are used by the lexical analyzer and which are used by the the syntax analyzer, respectively, and how. Lint out the tokens and give a brief definition of each, in words (based on the grammar). (6 marks) 6) For each sentence below, give the output of the lexical analyser (i.c. a list of lexemen and their tokens), show the recognition work done accordingly by the wyntax analyser, and indicate the outcome i.c., whether the sentence is valid or, if not, which error in detected. (6 marka) (1) -123+800 (1) 421-33+7 (iii) 1+06 (c) Explain the issue created if we change rule #4 to: <signs 1 Think of a possible solution and give the idea briefly (4 marks) -> +
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply