Empty lines

An empty line may hold blanks and a comment. Empty lines are allowed anywhere — between directives, between the parameters of a message, and between its text lines.

Comments

A # starts a comment that runs to the end of the line. It may stand on a line of its own or follow a directive or a quoted text line:

# the module
$MODULE errors          # → errors.hh, errors.cpp

$MESSAGE NotFound
"not found: {$path}"    # the closing quote ends the text, then a comment

A # is not a comment inside a quoted string or anywhere on a |bar text line — there it is text. In the directives that take the rest of the line ($USING, $IMPORT, $ERROR … EXIT, a parameter's type) the text stops at a #.

Line ends

After a directive's last option, and after a quoted text line's closing quote, only blanks and a comment may follow. Anything else is an error:

errors.msg:3:14: error: unexpected 'j', expected end of line

Blanks are spaces, tabs and carriage returns, so a file with Windows (CRLF) line ends reads the same as one with LF. The last line needs no newline.