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, 03.07.2019 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 18:10
A-mn has a cubic structure with a0 0.8931 nm and a density of 7.47 g/cm3. b-mn has a different cubic structure, with a0 0.6326 nm and a density of 7.26 g/cm3. the atomic weight of manganese is 54.938 g/mol and the atomic radius is 0.112 nm. determine the percent volume change that would occur if a-mn transforms to b-mn.
Answers: 2
question
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
question
Engineering, 04.07.2019 19:10
Starting wih an energy balance on a rectangular volume element, derive the one- dimensional transient heat conduction equation for a plane wall with constant thermal conductivity and no heat generation.
Answers: 1
You know the right answer?
In this assignment you are to implement a recursive-descent recognizer with a web interface for the...
Questions
question
Computers and Technology, 04.05.2021 22:00
question
Mathematics, 04.05.2021 22:00
question
Computers and Technology, 04.05.2021 22:00
question
Mathematics, 04.05.2021 22:00
question
Mathematics, 04.05.2021 22:00
Questions on the website: 13722359