Coolquest, Inc. | Home | Products | Support | About | Contact | |||
|
<<< Previous | CBOLD Reference Home | Next >>> |
Although auto_reg parses the designer's source code file, it does not fully interpret it in the same way that a C++ compiler does. It ignores preprocessor statements, such as #include "myfile.h" and does not interpret the line continuation character (backslash(\) as the last character on a line) in all cases (see table below). Thus it is possible for auto_reg to do something unexpected if it encounters unusual code. Nonetheless, auto_reg is designed to follow the line-by-line rules described above regardless of the source code encountered.
There is rarely a need to use line continuation in a CBOLD design. Due to the line-by-line nature of the processing it performs, auto_reg cannot properly interpret every case in which a line continuation character might be used.
auto_reg correctly handles the line continuation character in these cases:
within a preprocessor directive |
within an end-of-line comment unless that comment contains an auto_reg directive (// AR_... )
|
auto_reg will issue an error message when a line is terminated with a line continuation character in this case:
within an end-of-line comment that starts with an auto_reg directive |
Typically, auto_reg will issue a warning when a line continuation character is ignored. In unusual cases, auto_reg may misinterpret source code that contains a line continuation character.
Handling of Line Continuation:
Case | auto_reg Reaction to Line Continuation Character |
---|---|
preprocessor (#) line | handled properly: preprocessor statement continues onto next line(s) |
line with auto_reg directive | error: line continuation character not allowed if auto_reg directive |
line with other EOL comment | handled properly: comment continues onto next line(s) |
within /* */ comment | handled properly: ignored, because entire comment is ignored |
most other cases | warning: line continuation character ignored |
some other cases | error: unexpected token |
EOL comments are end-of-line comments beginning with //.
auto_reg directives are EOL comments used to control auto_reg, e.g., // AR_IGNORE
.
<<< Previous | CBOLD Reference Home | Next >>> |
Legal | Copyright © 2007 by Coolquest, Inc. | Contact |