Q4Compiler Design
Question
2 marks
What is Context-Free Grammar?
Answer
A Context-Free Grammar (CFG) mathematically defines the rigid syntax of a programming language.
A Context-Free Grammar (CFG) is a strict formal mathematical system utilized by compiler engineers to precisely define the syntax of a programming language. It is defined by a 4-tuple , where are non-terminals, are terminal symbols, are production rules (always in the form ), and is the start symbol.