Question: Currently, I ' m running a full - on Linux environment on WSL , or Windows Subsystem for Linux, with an Ubuntu distribution. My code
Currently, Im running a fullon Linux environment on WSLor Windows Subsystem for Linux, with an Ubuntu distribution. My code editor of choice is Visual Studio Code, and I already set it up to work seamlessly on this setup.
Installation Process
Visual Studio Code:
I installed it using the deb package. The following is the used command:
sudo dpkg i code.deb
Compiler Tools Flex & Bison
To be within the course requirement, I have installed Flex and Bison through the following commands:
sudo aptget update
sudo aptget install flex bison
Below is a screenshot demonstrating the successful installation of these tools.
THE ASK
Provide a program in the target language of our compilerinterpreter that incorporates all elements of the language. It must include all of the following:
Integer Decimal and HexadecimalReal and Character literals
Every arithmetic operator: ~
Every relational operator:
Every logical operator: &
A when statement
An if statement
A switch statement
A fold statement
Multiple variable declarations
Multiple parameter declarations
In addition, your program should be written in a such a way that it tests the associativity and precedence of all operators. It should also include nested statements.
Also provide several sets of input values for the parametersto the program, enough so that every line of code within the program is executed at least once. For each input supplied, provide the corresponding output.
Discussion questions are requiring code examples using the target language
Test case example
Function with a lexical error
function main returns integer;
begin
$ ;
end;
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
