Engineering
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

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, yasminothman02
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15Β°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
image
Engineering, 04.07.2019 18:10, anna22684
Water at 70Β°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
image
Engineering, 04.07.2019 18:10, mirmir62
Machinery that is a key part of the process and without which the plant or process cannot function is classifed as: (clo4) a)-critical machinery b)-essential machinery c)-general purpose machinery d)-none of the specified options.
Answers: 1
image
Engineering, 04.07.2019 18:20, jessie8022
Apiston-cylinder device contains 0.1 m3 of liquid water and 0.9 m3 of water vapor in equilibrium at 800 kpa. heat is transferred at constant pressure until the temperature of water reaches 350 Β°c. determine (a) the quality of water at the initial state (b) the work associated with this process, (c) the heat associated with this process.
Answers: 2
Do you know the correct answer?
In this assignment you are to implement a recursive-descent recognizer with a web interface for the...

Questions in other subjects:

Konu
Mathematics, 08.01.2021 23:00
Konu
Mathematics, 08.01.2021 23:00
Konu
Mathematics, 08.01.2021 23:00