. (5 points) The following EBNF rules describe the syntax of decimal literals in Ada. Draew a state diagram that represents the following rule set. [.


. (5 points) The following EBNF rules describe the syntax of decimal literals in Ada. Draew a statediagram that represents the following rule set.<decimal_literal> <numeral> [. <numeral>] [<exponent>]<numeral> <digit> {[underline] <digit>}<exponent> E [+ | -] <numeral><digit> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9<underline> _2. (5 points) Name the 4 main evaluations of a programming language? Describe in detail three otherevaluations and how they tie into the 4.3. (5 points) Convert the lexical analyzer given in Section 4.2 to Java and modify it to recognize thefollowing list of reserved words and return their respective token codes:for, 30;if, 31;else, 32;while, 33;do, 34;int, 35;float, 36;switch, 37.4. (5 points) Perform the Pairwise disjointness test for the following Grammar rules:a) A → aB | b | cBBb) B → aB | bA | BBbc) C → aaA | b | caB | aB5. (5 points) Perform the Pairwise disjointness test for the following Grammar rules:S → aSb | bAAA → b {aB} | a | BcB → aB | c6. (15 points) Given the following Grammar and the right sentential form draw a parse tree and show thephrases, simple phrases and handle.S → AbB | bAcA → Ab | aBBB → Ac | cBb | ca) aAccbcBb b) baBcBbbbc c)accbcccbb7. (10 points) Show a complete parse, including the parse stack contents, input string, and action for thestringsa) id ∗ (id) + idb) id + (id + id)c) id + id − id8. (5 points) Draw the Von Neumann architecture and detail how each portion affects in the compilationsprocess?9. (5 points) Draw, label and describe the processes for compilation and for interpretation, describe thedifferences between the two10. (10 points) Name, describe, and define two (2) different programming paradigm ( Not Including the oneprovided )s two (2) languages that are included in each.For Example: Declarative Programming A language that expresses the logic of a computation withoutdescribing its control flow. This is a language that contrast imperative programming and implementsalgorithms in explicit steps. Declarative programming often considers programs as theories of formal logicand computations as deductions in that logic sequence. Languages SQL (Database Query Language),Analytica (Declarative Modeling Langugae)11. (5 points) Create a visual representation ( Linked List Style ) of how the following program is stored inLISP:(defun factorial (N)”Compute the factorial of N.”(if (= N 1)1(* N (factorial (- N 1)))))12. (5 points) Show the steps in processing the value of factorial(5) :13. (5 points) Lexically analyze the following code segment. Give the total number of lexemes. State thetoken provided for each value ( reserved words, assignment operators, identities, etc. )int currSum = 0;int oddCount = 0;for(int i = 1; currSum + i <= num; i+=2) {currSum += i;oddCount++;}14. (5 points) Perform the Pairwise disjointness test for the following Grammar rules:S → aSb | bAAA → b {aB} | a | BcB → aB | c15. (5 points) Find the weakest precondition:a = 3 / b;b = a – 3;if ( b > a ){b++;} else {b = 3 * b;}{ b > 0}16. (10 points) Prove Correctness:{ n >= 0 }k = n;f = 1;while( k > 0 ){f = f * k++;}{ f = n! }{ x > 0 }while( x < 10 ){x = x + 1;}{ x >= 10 }