Appendix D. Formal Syntax Definition

This appendix contains the formal definition[1] of the Verilog-2001 standard in Backus-Naur Form (BNF). The formal definition contains a description of every possible usage of Verilog HDL. Therefore, it is very useful if there is a doubt on the usage of certain Verilog HDL syntax.

Though the BNF may be hard to understand initially, the following summary may help the reader better understand the formal syntax definition:

  1. Bold text represents literal words themselves (these are called terminals). Example: module.

  2. Non-bold text (possibly with underscores) represents syntactic categories (these are called non terminals). Example: port_identifier.

  3. Syntactic categories are defined using the form: syntactic_category ::= ...

Get Verilog® HDL: A Guide to Digital Design and Synthesis, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.