subject
Engineering, 15.08.2021 02:10 Kaysofine11icloudcom

INTRODUCTION: JavaCup is a parser-generator, and works by creatinga shift-reduce parsing table using the theory and techniques youuse in question 1. In directory on Ouranos:/local/public/cas380/course work20 you will ?nd the speci?cation ofa simple programming language TLM. This comprises of a syntaxscanner and a JavaCup speci?cation with an interpreter in itsaction code. TLM is an extremely simple programming language: ithas 3 integer variable names (x, y and z), simple booleanexpressions, an assignment statement, a do while statement, a printstatement, and a simple user-de?ned function facility. Study thecommented speci?cation and make sure you understand fully how TLMworks. Use JavaCup to create an interpreter for TLM in the usualway. In that directory there is an example program “input program1”that can be run using the JavaCup-created interpreter, asfollows: start; function; do x = x-1; y = x*x; print(x, y); while x > 10 ;end; x = 23; call; x=15; call; finish; TLM is very basic - its parser and interpreter are lacking in datatypes, structured code features etc. TLM only checks the ?rstletter of each keyword. ASSIGNMENT: create your own more advancedinterpreted programming language called MYPL. You must do thisusing the already written TLM as a base. In other words startingfrom the components of TLM, build up your own language and interpreter. Your language must have the following enhancements.(*i*) Long variable names: rather than only x, y or z, your languageshould allow a range of variable names to be used. (*ii*)Declarations: your language must only allow variable names to beused if they have been previously declared (*iii*) Keywords:keywords such as while end etc should be parsed only if they arespelled properly (*iv*) Function: The function declarationstructure in TLM is extremely basic: e. g. only one function can bedeclared, it has no name, and it must be declared at the beginningof the program; and the function has no parameters or localvariables.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 15:10
If you were designing a bumper for a car, would you prefer it to exhibit elastic or plastic deformation? why? consider the functions of a bumper in both a minor "fender-bender" and a major collision.
Answers: 1
question
Engineering, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 °f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
question
Engineering, 04.07.2019 18:10
Which of the following refers to refers to how well the control system responds to sudden changes in the system. a)-transient regulation b)- distributed regulation c)-constant regulation d)-steady-state regulation
Answers: 1
question
Engineering, 04.07.2019 18:10
Calculate the bore of a cylinder that has a stroke of 18 inches and an extension time of 6 seconds at a flow rate of 4 gal/min.
Answers: 3
You know the right answer?
INTRODUCTION: JavaCup is a parser-generator, and works by creatinga shift-reduce parsing table using...
Questions