0 votes 0 votes In Operator precedence parsing, precedence relations are defined, i. for all pair of non-terminals. ii. for all pair of terminals. iii. to delimit the handle. iv. only for certain pair of terminals. Compiler Design compiler-design operator-grammar + – AnilGoudar asked Sep 18, 2017 AnilGoudar 2.2k views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply PEKKA commented Nov 18, 2016 reply Follow Share is it C ? 0 votes 0 votes thor commented Nov 18, 2016 reply Follow Share B is given 0 votes 0 votes A_i_$_h commented Sep 19, 2017 reply Follow Share is it option b? 0 votes 0 votes smsubham commented Apr 2, 2020 reply Follow Share B is correct. All operators and terminals have entry in operator precedence table. For non terminals no such entry is present. See this: https://www.geeksforgeeks.org/operator-grammar-and-precedence-parser-in-toc/ 0 votes 0 votes Please log in or register to add a comment.
2 votes 2 votes it is Option - (b) Precedence Relation Table is constructed to decide the priority of the operators, we use a stack here if(stack.top()<=current->symbol){ stack.push(current->symbol); current=current->next; } else { stack.pop(); current=current->next; } Salazar answered Sep 25, 2017 Salazar comment Share Follow See 1 comment See all 1 1 comment reply AnilGoudar commented Sep 25, 2017 reply Follow Share But for terminal {$, $} , there is no associativity defined as the ORT(operator relational table ) contains blank entry at [$,$]. 0 votes 0 votes Please log in or register to add a comment.
2 votes 2 votes A:- There are two important properties for operator precedence parsers is that 1)it doesn't appear on the right side of any production 2)no production has two adjacent no terminals So the answer would be (A) for all pair of non terminals Ravijha answered Jun 20, 2019 Ravijha comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes option A) is correct gabbar answered Oct 15, 2017 gabbar comment Share Follow See 1 comment See all 1 1 comment reply Namit Dhupar commented Oct 20, 2017 reply Follow Share Sorry bro, you are wrong... operator precedence relations exists between the operators such is - {id,+,*,$} (Terminals) 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes If we go forward by assuming that question is asking only for parser table than answer is B. C is the consequence of using relation in parsing process. Question is asking only defined not why table is constructed. Chandan1990 answered Oct 30, 2017 Chandan1990 comment Share Follow See all 0 reply Please log in or register to add a comment.