INSTRUCTIONS
Each Group should develop a mini compiler software using JAVA that would accept any string in the form of statement as used in programming languages.
Please, take note of the following guidelines:
(a) The program should be able to accept any string and report the correctness or
otherwise of each string.
(b) The program should ask the user for a string and check for correctness.
(c) If the string is correct, the program should do the translation by going through
all the 7 stages below.
(d) If the string is wrong, then it should report the errors and no translation is done
in stages 1 to 7.
(e) The program should be tested with at least 10 different strings.
(f) There should be one entry and one exit point in the program.
(g) The output of the program should contain the following stages of Compiler
Techniques:
Stages of Compiler Techniques:
Stage 1: Lexical Analysis
Stage 2: Syntax Analysis
Stage 3: Semantic Analysis
Stage 4: Intermediate Code Representation
Stage 5: Code Generation
Stage 6: Code Optimisation
Stage 7: Target Machine Code
(h.) Compile all your Java codes into a jar file or executable file, so that it can be run as a single file on command line or on MS Windows.
(j) Run the mini compiler project in the link below to see a sample output, of what
is expected from each group project.
Follow the steps below to run a sample mini compiler project:
-Create a folder in your C drive name: CTE711S-PROJECT.
-Copy the jar file (StringTokenizer3.jar) to the folder: CTE711S-PROJECT. The jar file is on the course page of elearn.
-Type this command on your C prompt command interface:
java -jar "C:\CTE711S-PROJECT\StringTokenizer3.jar"
-Press Enter key and interact with the system to see the sample output.
---------------------------------------------------------------
INSTRUCTIONS Each Group should develop a mini compiler software using JAVA that would accept any string in the form of s
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
INSTRUCTIONS Each Group should develop a mini compiler software using JAVA that would accept any string in the form of s
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!