Question: Imagine you are going to write a compiler for a new programming language. The first step is building a Lexical Analyzer. So, your job in

Imagine you are going to write a compiler for a new programming language. The first step is building a Lexical Analyzer. So, your job in this homework is: 1) Write a simple tokenizer using Javac Task 1(Jaxaca) Write JavaCC code to describe the previous tokens. The output should contain each token image and kind. Read the input from the user Add lexical actions to the Arithmetic Operators to print (Found Arithmetic Operation and to the Punctuation Marks to print (Found Punctuation Mark) Test the lexical actions by one example of your choice and capture the result. Copy and paste the lexical specification Part from JJ file here Test the following statements: Capture the Screen for each statement # Statement Output_(Screen shot) Explain the reason of error (if any) 1 $x1 ADD Syl: 2 $time99 - $speed99: 3 @name: Layla @ 100 PLUS 101; 4 SmyGrade01 DIV $totalo MULT 100: 5 @date: 1-1-2020 @ 500 DIV 4; Imagine you are going to write a compiler for a new programming language. The first step is building a Lexical Analyzer. So, your job in this homework is: 1) Write a simple tokenizer using Javac Task 1(Jaxaca) Write JavaCC code to describe the previous tokens. The output should contain each token image and kind. Read the input from the user Add lexical actions to the Arithmetic Operators to print (Found Arithmetic Operation and to the Punctuation Marks to print (Found Punctuation Mark) Test the lexical actions by one example of your choice and capture the result. Copy and paste the lexical specification Part from JJ file here Test the following statements: Capture the Screen for each statement # Statement Output_(Screen shot) Explain the reason of error (if any) 1 $x1 ADD Syl: 2 $time99 - $speed99: 3 @name: Layla @ 100 PLUS 101; 4 SmyGrade01 DIV $totalo MULT 100: 5 @date: 1-1-2020 @ 500 DIV 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
