๐Ÿ“– Formal grammar

= collection of syntax definitions in a ๐Ÿ“• Formal Language that define valid words or phrases

Classification

โ†’ ๐Ÿชœ Chomsky Hierarchy

Units

Types

How to check?

Relationships

Two grammars areโ€ฆ

  • Weakly equivalent: generate same strings
  • Strongly equivalent: generate the same strings and structures (= parse tree)

๐Ÿ“– Example: