write an interpreter for a minimal form of Julia. This minimal form of Julia has only 1 data type, integer, and the only identifiers are
write an interpreter for a minimal form of Julia. This minimal form of Julia has only 1 data type, integer, and the only identifiers are single letters.
The interpreter will parse a Julia program and build some intermediate data structures. These data structures will then be interpreted to execute the program. All tokens in this language are separated by white space. The parsing algorithm should detect any syntactical or semantic error. The first such error discovered should cause an appropriate error message to be printed, and then the interpreter should terminate. Run-time errors should also be detected with appropriate error messages being printed.( java language)
include the source scanner (syntax analyzer)program, input and output files. make a short report of the work.The report must show the execution of this scanner program by using appropriate input files, the program must show a list of the tokens scanned.( Java code)
Grammar for the Language
Parser
Lexical Analyzer
id letter
literal_integer digit literal_integer | digit
assignment_operator =
le_operator <=
lt_operator <
ge_operator >=
gt_operator >
eq_operator = =
ne_operator !=
add_operator +
sub_operator -
mul_operator *
div_operator /
mod_operator %
rev_div_operator \
exp_operator ^
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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