Question: PLEASE INCLUDE STEP B Y STEP INSTRUCTIONS HOW T O EXECUTE THIS I N LINUX COMMAND LINE. WHAT COMMANDS D O I RUN? The projects

PLEASE INCLUDE STEP BY STEP INSTRUCTIONS HOW TO EXECUTE THIS IN LINUX COMMAND LINE. WHAT COMMANDS DO I RUN?
The projects for this course require a Linux environment that has the compiler tools flex and bison together with make and the GNU g++ compiler. Explain what Linux environment you plan to use and post a screen shot demonstrating that your environment has the required tools.
The language that you will be expected to write a compiler for is a language created for this course. A functional language was chosen because such languages can be easily interpreted without generating any intermediate code. It is important that you understand the language first, so examine the lexical rules that are provided in the project 1 specification in week 2 and the syntax rules that are provided with the project 2 specification in week 4. Write a short program in this language that contains one function, and has at least one input, one variable and one statement of your choice. Show the output of that program on two different inputs. Here is an example of the kind of program you should create:
// A Simple Program with a When and Switch Statement
function main a: integer returns integer;
b: integer is when a >10,1 : 2;
begin
switch b is
case 1=>10;
case 2=>20;
others =>30;
endswitch;
end;
If this program is run with an input of 5, it returns 10. If it is run with an input of 15, it returns 20. If you have any questions on the semantics of this language, post your question as a response to this topic.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!