I need descriptive answer not copied ans from other sites and please follow the instructions .Discussion questions f should be written in the target language of the course. None of the examples for this discussion are to be written in languages as C, C#, C++, JAVA, 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 syntax rules . Write a short program in this language that contains one function, and has at least one input, one variable and one conditional expression. Show the output of that program on two different inputs. Here is an example of the kind of program that I am looking for: - Simple Program with one function function main a: integer returns integer; b: integer is a * 2; begin if a <= 0 then b + b; else b* b; endif; end; If this program is run with an input of 3, it returns 36. If it is run with an input of -3, it returns -12. If you have any questions on the semantics of this language, post your question as a response to this. Please provide refernce at the end as well. Please provide the reference must and entertain every part of this question .
I need descriptive answer not copied ans from other sites and please follow the instructions .Discussion questions f should be written in the target language of the course. None of the examples for this discussion are to be written in languages as C, C#, C++, JAVA,
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 syntax rules . Write a short
- Simple Program with one function
function main a: integer returns integer;
b: integer is a * 2;
begin
if a <= 0 then b + b;
else
b* b; endif;
end;
If this program is run with an input of 3, it returns 36. If it is run with an input of -3, it returns -12. If you have any questions on the semantics of this language, post your question as a response to this. Please provide refernce at the end as well. Please provide the reference must and entertain every part of this question .
Step by step
Solved in 3 steps with 3 images