COMP141 Scanner for Limp and Imperative Language Course Project
COMP141 Scanner for Limp and Imperative Language Course Project
see the documents
use java
just follow the documents step by step
example:
x32 := 36 – y;
if y then
x32 :=0; skip
else
whiley := 12^2;
z:= x32
endif
Then, the output of the program may be as follows:
2
Line: x32 := 36 – y;
x32 : IDENTIFIER
:= : PUNCTUATION
36 : NUMBER
– : PUNCTUATION
y : IDENTIFIER
; : PUNCTUATION
Line: if y then
if : KEYWORD
y : IDENTIFIER
then: KEYWORD
Line: x32 :=0; skip
x32 : IDENTIFIER
:= : PUNCTUATION
0 : NUMBER
; : PUNCTUATION
skip: KEYWORD
Line: else
else: KEYWORD
Line: whiley := 12^2;
whiley: IDENTIFIER
:= : PUNCTUATION
12 : NUMBER
ERROR READING “^”
Line: z:= x32
z : IDENTIFIER
:= : PUNCTUATION
x32 : IDENTIFIER
Line: endif
endif : KEYWORD
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


