Question: Would you please help me in Java Given a program in java and python the lexical analyzer should do the following: It should identify all

Would you please help me in Java
Given a program in java and python the lexical analyzer should do the following:
It should identify all the keywords.
It should identify all the identifiers.
It should identify all the literals( integer, float, string, character)
General Requirements:
The project can be done individually or as a group (up to 2 members).
All the output screenshots and codes should be included in the report document. The document should include the following:
Title
Team Members
Design of your scanner
Implementation(codes are pasted here)
Output screenshots
References
Work should be entirely yours! Please use a lexical analyzer system for simple
arithmetic expressions in your textbook (Chapter 4) as a reference.
Test data : Program should be able to perform lexical analysis for the following source code
Python:
def add_numbers(num1, num2):
sum = num1+ num2
print('Sum: ',sum)
Java:
public class JavaExample {
public static void main(String[] args){
int num1=5, num2=15,sum;
sum = num1+num2;
System.out.println("Sum of "+num1+" and "+num2+" is: "+sum);
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!