Question: Develop a complete Interpreter in python that executes with the scanner and parser for the Julia Grammar below. You must show the execution of this
Develop a complete Interpreter in python that executes with the scanner and parser for the Julia Grammar below. You must show the execution of this program by using several relevant source lines as input, the program must show the corresponding statement recognized. Write a short report with READABLE screenshot of your execution output, then your report describing the work performed, followed by your interpreter code copied and pasted as text.
Scanner
import re
# Define token types
tokenspec
FUNCTION rbfunctionb
END rbendb
IF rbifb
THEN rbthenb
ELSE rbelseb
WHILE rbwhileb
DO rbdob
REPEAT rbrepeatb
UNTIL rbuntilb
PRINT rbprintb
ID rAZazAZaz
ASSIGN r
LEOperator', r
LTOperator', r
GEOperator', r
GTOperator', r
EQOperator', r
NEOperator', r~
AddOperator', r
SubOperator', r
MulOperator', r
DivOperator', r
INTEGER rd
NEWLINE r
SKIP rt
MISMATCH r
# Compile the regex for efficiency
tokenregex joinP
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
