CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Yacc semantic action is a sequence of -

A
Tokens
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Expression
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
C Statements
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Rules
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C C Statements

Yacc semantic action is a sequence of C Statements.

A program must do more than parse input; it must also produce some output based on the input. In a Bison grammar, a grammar rule can have an action made up of C statements. Each time the parser recognizes a match for that rule, the action is executed.

Yacc (Yet Another Compiler-Compiler) is a computer program for the unix operating system. It is a look ahead left-to-right (LALR) parse generator, generating a parser, the part of a compiler that tries to make syntactic sense of the source code, specifically a LALR parser.

Yacc provides a general tool for describing the input to a computer program. The Yacc user specifies the structures of his input, together with code to be invoked as each such structure is recognized. Yacc turns such a specification into a subroutine that handles the input process; frequently, it is convenient and appropriate to have most of the flow of control in the user's application handled by this subroutine.



flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Database Structuring
ACCOUNTANCY
Watch in App
Join BYJU'S Learning Program
CrossIcon