The Verilog Hardware Description Language, Fifth Edition

Verilog source text files consist of a stream of lexical tokens separated by white space. The spacing of tokens is free format the specific choice of tabs, spaces, or newlines to separate lexical tokens is not important to the compiler. However, the choice is important for giving a readable structure to the description. It is important that you develop a consistent style of writing your Verilog descriptions. We offer the examples in the book as a starting point to develop your own personal style.
The types of lexical tokens in the language are: white space, comments, operators, numbers, strings, identifiers, and keywords. This Appendix will discuss each of these.
White space is defined as any of the following characters: blanks, tabs, newlines, and formfeeds. These are ignored except for when they are found in strings.
There are two forms of comments. The single line comment begins with the two characters // and ends with a newline. A block comment begins with the two characters /* and ends with the two characters */. Block comments may span several lines. However, they may not be nested.
Operators are single, double or triple character sequences that are used in expressions. Appendix C lists and defines all the operators.
Constant numbers can be specified in decimal, hexadecimal, octal, or binary. They may optionally start with a + or ?, and can be given in one of two forms.
The first form is an unsized decimal...