COMPILER DESIGN

SYNTAX ANALYSIS

ERROR RECOVERY IN SYNTAX ANALYSIS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which action in the shift reduce parsing detect the syntax errors
A
ACTION
B
GOTO
C
Error
D
Reduce
Explanation: 

Detailed explanation-1: -A shift-reduce parser is a class of efficient, table-driven bottom-up parsing methods for computer languages and other notations formally defined by a grammar. The parsing methods most commonly used for parsing programming languages, LR parsing and its variations, are shift-reduce methods.

Detailed explanation-2: -The handle is always the top one or more symbols in the stack. There are two main kinds of actions. A shift action moves a token from the input to the top of the stack. A reduce action finds a handle on the stack and a production N → , and replaces by N.

Detailed explanation-3: -A shift/reduce parser is an interpreter which uses an additional data structure called a STACK to keep a record of the constituents it finds.

There is 1 question to complete.