Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in JAVA Compiler Construction Develop a compiler in java using IDE IntelliJ that should fulfill following requirements: - Provide a text area on the screen
in JAVA
Compiler Construction
Develop a compiler in java using IDE IntelliJ that should fulfill following requirements: - Provide a text area on the screen to allow user to type in or paste a source program as input. - Provide separate buttons on the screen to perform Lexical Analysis, Syntax Analysis and Exit. - Display the output somewhere on the screen when user chooses Lexical or Syntax Analysis. - Recognize following tokens for the lexemes in the input source program: - Keywords: int, char, string, if, else, do, while. - Identifiers (ID): letter followed by zero or more letters or digits. - String Literal: (SL): anything that is surrounded by double quotes, for example "Hello" - Integer value (IV): example: 155 (unsigned only) - Relational Operators (ROP): 10){ val2 =5; else \{ val2=10; total =(val1+val2) val1; Sample Svmbol Table: Sample Input Source Code for Syntax Analysis: (val2+val1)*val3 Sample Symbol TableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started