Formal Definition

It is a is a formal grammar used to specify the syntax of the language and is used to design parsers.

A context-free grammar (CFG) consisting of a finite set of grammar rules defined in a 4-tuple() defined as where:

  • is a set of non-terminal symbols.
  • is a finite set of terminals where . It makes up the actual content of the sentence.
  • is a set of rules or productions of grammar defined as , where the asterisk represents the Kleene star operation.
  • is the start symbol.

And is the grammar of the language .