Reference no: EM131137027
Interpreter Project
This project will be to write an interpreter for a minimal form of Blue. This minimal form of Blue has only 1 data type, integer, and the only identifiers are single letters. Blue is case sensitive.
The interpreter will parse a Blue 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.
Grammar for the language
Parser
<program> → feature id do <statement_list> end id
<statement_list> → <statement> | <statement><statement_list>
<statement> → <if_statement> | <assignment_statement> | <loop_statement> | <print_statement> | empty_statement>
<if_statement> → if <boolean_expression> then <statement_list> else <statement_list> end if
<loop_statement> → loop <statement_list> exit on <boolean_expression><statement_list> end loop
<assignment_statement> -> id <assignment_operator><arithmetic_expression>
<empty_statement> ->
<print_statement> → print ( <arithmetic_expression> )
<boolean_expression> → <relative_op><arithmetic_expression><arithmetic_expression>
<relative_op> → le_operator | lt_operator | ge_operator | gt_operator | eq_operator | ne_operator
<arithmetic_expression> → <id> | <literal_integer> | <arithmetic_op><arithmetic_expression><arithmetic_expression>
<arithmetic_op> → add_operator | sub_operator | mul_operator | div_operator
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 → /
Complete the case study etsy breaking down a business model
: Read how to analyze a case and then complete the steps below: - The introduction: a brief of my understanding of the case - The environmental analysis Stating the problem.
|
Speed of light is a universal constant and has not changed
: What will happen if all the clocks in the universe also start running at half the speed ?
|
Capabilities of the firm and evaluate based on value
: Choose an organization and identify the resources or capabilities of the firm and evaluate based on value (v), rarity (r), imitability (i), and organizational aspects (O). Support your conclusions.
|
Mobile-enabled diabetes management devices
: Prepare a Marketing Plan for Johnson & Johnson's mobile-enabled diabetes management devices, services and apps.The prototype iPhone application that would let users upload glucose readings from their connected blood glucose monitors directly to th..
|
Write an interpreter for a minimal form of blue
: This project will be to write an interpreter for a minimal form of Blue. This minimal form of Blue has only 1 data type, integer, and the only identifiers are single letters. Blue is case sensitive
|
Risk for work-related musculoskeletal disorders
: Identify a minimum of 3 job titles in the health care industry (e.g., nursing homes, hospitals, ambulatory clinics, surgical centers) whose workers are at risk for work-related musculoskeletal disorders.
|
Why is egoism form of moral relativism
: Imagine that you are in a philosophy lecture class and the topic is philosophy known as stoicism, specifically on the idea that the wise person will act only to enjoy him or herself, and to get what he or she wants. Show you would organize your mater..
|
As a consultant to an international organisation
: Background As a consultant to an international organisation, you are required to review the organisation's operations strategy and provide a detailed report on your findings.
|
Compare the pain relief effectiveness between the groups
: What is the next test that is performed to determine specifically which of the four groups are different - what statistical test should be used?
|