B.1  Explanation of the Verilog HDL BNF

B.1  Explanation of the Verilog HDL BNF

Annex A of the Verilog HDL LRM describes syntax using the BNF (Backus–Naur form). The Verilog HDL BNF is slightly different from that employed in the VHDL LRM (see Appendix A, Section A.1, “BNF”). The BNF syntax in the Verilog LRM is normative , which means that the syntax is part of the definition of the language (and the complete BNF description is contained in an annex ). The BNF syntax in the VHDL LRM is informative , which means the BNF is not part of the standard defining the language (and the complete BNF description is contained in an appendix ). The following items summarize the Verilog HDL BNF syntax:

  • name (in lowercase) is a syntax construct item ( term , or syntactic category ) defined by other syntax construct token items ( items , parts , or tokens ) or by lexical token items.
  • NAME (in uppercase) is a lexical token item , the leaves in a tree of definitions.
  • [ name ] is an optional item .
  • { name } is one or more items.
  • The symbol ::= gives a syntax definition ( definition , rule , construct , or production ) for an item (i.e., the symbol ::= means is equivalent to ).
  • | introduces an alternative syntax definition (i.e., the symbol | means or ).
  • Braces and brackets, { } and [ ] , that are required by the syntax are set in bold, { } [ ] , in the 95 LRM, despite the fact they are difficult to distinguish from the plain versions.
  • The vertical bar, | , that represents an alternative definition is set in bold,   | , in the 95 LRM, despite being difficult to distinguish from the plain version.
  • All other characters that are set in bold (as they are in Annex A of the 95 LRM) are literals required by the syntax (for example, a plus sign  '+' ).
  • Italic prefixes, for example, msb _constant_expression , are comments.
  • Keywords are printed in bold , as they are in Annex A of the 95 LRM.
  • Definitions here are in alphabetical order (Annex A of the 95 LRM groups definitions by function). The highest-level definition is source_text ; this is where you start. The lowest-level items are in uppercase; these are where you end.
  • The BNF is reproduced exactly as it appears in Annex A of the 95 LRM. Footnotes explain a number of typographical issues.
  • References in brackets immediately following the ::= symbol form backward-pointing links to the constructs that reference a particular item. Thus, for example, always_construct ::= [94] indicates that construct number 94 ( module_item ) references the item always_construct (see also Table B.1 , which collects all these links together, and Table B.2 , which is a keyword index).
  • References in brackets following the construct links refer to the 95 LRM. Thus, for example, always_construct ::= [94] [95LRM 9.9.2] , indicates that section 9.9.2 of the 95 LRM contains the definition for always_construct .

Chapter start ] [ Previous page ] [ Next page ]

Teledyne Optech
Bentley: YII 2016
CADalog.com - Countless CAD add-ons, plug-ins and more.

Internet Business Systems © 2016 Internet Business Systems, Inc.
595 Millich Dr., Suite 216, Campbell, CA 95008
+1 (408)-337-6870 — Contact Us, or visit our other sites:
AECCafe - Architectural Design and Engineering EDACafe - Electronic Design Automation TechJobsCafe - Technical Jobs and Resumes  MCADCafe - Mechanical Design and Engineering ShareCG - Share Computer Graphic (CG) Animation, 3D Art and 3D Models
  Privacy Policy