Question: 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 Table
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
