🌱Aadam's Garden

Search

Search IconIcon to open search

Grammar

Last updated Aug 16, 2022

Source:: Software Design Patterns - Best Practices for Software Developers


Every human language has an associated grammar that defines what constructs are legal or illegal. Similarly, computer languages are defined by grammar too. Given a snippet of code, the language defined by the grammar would determine if the code is syntactically correct or not.

There are four types of grammar known as the Chomsky hierarchy: