Question: 1)What is the grammar accepted by these two interpreters? Write as EBNF form 2)How can the bison program evaluate the input, e.g., print out the

1)What is the grammar accepted by these two interpreters? Write as EBNF form

2)How can the bison program evaluate the input, e.g., print out the result

Note: both take in 0-9, +, -, /, *, but does not take negative numbers .

a)

1)What is the grammar accepted by these two interpreters? Write as EBNF

b)

form 2)How can the bison program evaluate the input, e.g., print out

[02/12/19]seed@VM$ cd cps352s19/labs/labl/calcl [02/12/19] seed@VM:-/.../calcl$ ls build calcl.l calcl.y [02/12/19] seed@VM:-1.../calcl$ ./build calcl.y: warning: 4 shift/reduce conflicts [-Wconflicts-sr] [02/12/19]seed@VM:-/.../calcl$ ls build calc1. ex . yy . .tab . .tab.o calcl calci.y lex.yy.o y.tab.h [02/12/19]seed@VM:-/.../calc1$ ./calcl 1+3-2 2 6-3-2 syntax error [02/12/19]seed@vM:-/.../calc1$ I 300 *calco.l (/cps352s19/labs/lab1) gedit )1:40AM Terminal [02/12/19]seed@VM:-/.../calc2$ ls build calc2.1 cale2.y [02/12/19]seed@VM:-/.../calc2$ build [02/12/19] seed@VM:-/.../calc2$ ls build calc2 calc2.y lex.yy.o y.tab.h [02/12/19]seed@VM:-/.../calc2$ ./calc2 S calc2.1 . yy . .tab . .tab.o a=10 a+i 15 b-a-i Lex Tab Width: 8 Ln27, Col2 INS

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!