subject
Engineering, 02.03.2020 23:10 yourmumsanoodle

In this assignment you are to implement a recursive-descent recognizer with a web interface for the BNF grammar given below. Based on the pseudocode you have done in PL Assignment 1, this is a good opportunity to develop the web programming skills required by today's IT field. You must ask the user for input stream. EXP ::= EXP + TERM | EXP - TERM | TERM TERM ::= TERM * FACTOR | TERM / FACTOR | FACTOR FACTOR ::= ( EXP ) | DIGIT DIGIT ::= 0 | 1 | 2 | 3My pseudocode for PL 1:procedure exp()term()if (token == β€˜+’){match(β€˜+’)term()}Else (if token == β€˜-β€˜){match(β€˜-β€˜)term()}elseerrorsfou ndprocedure term()factor()if (token == β€˜*’){match(β€˜*’)factor()}else if (token == β€˜/’){match(β€˜/’)factor()}elseerrorsf oundprocedure factor()if (token == β€˜(β€˜){match(β€˜(β€˜)exp()match(β€˜)’)}else digit()procedure digit()if token == β€˜0’match(β€˜0’)else if token == β€˜1’match(β€˜1’)else (if token == β€˜2’)match(β€˜2’)else if (token ==’3’)match(β€˜3’)elseerrorfoundmatch (t)if (token == t)Basically create a javascript that can read a user's input thats a simple mathematical expression using ( ) * / + - and ends with $ (so that we know it terminates), and determine if that input is in a valid form or not. Example 2/(3+1)$ is valid, and 1*a$ is not valid

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Water in a partially filled large tank is to be supplied to the roof top, which is 8 m above the water level in the tank, through a 2.2-cm-internal-diameter pipe by maintaining a constant air pressure of 300 kpa (gage) in the tank. if the head loss in the piping is 2 m of water, determine the discharge rate of the supply of water to the roof top in liters per second.
Answers: 3
question
Engineering, 04.07.2019 18:10
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
question
Engineering, 04.07.2019 18:20
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10Β°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50Β°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
Answers: 2
question
Engineering, 04.07.2019 19:10
10 kg of co2 is initially contained at 400 kpa and 300 k. the gas constant for carbon dioxide is 189 j/lkg k) and has a specific heat ratio, k, of 1.289. isentropic expansion then occurs until the pressure is 200 kpa. a) determine the initial volume of co2 in m. b) determine the final temperature in k. c) determine the work done by the system during the expansion kl.
Answers: 2
You know the right answer?
In this assignment you are to implement a recursive-descent recognizer with a web interface for the...
Questions
question
Mathematics, 30.10.2021 14:00
Questions on the website: 13722362