Comment Parsing

Definitions can occur in any kind of source code comment, depending upon the source type.

Note that comments are ignored in sections that have been excluded by conditional compilation (see “The Pre-processor” section).

For ASM, comments extend from the first ; character seen on a line to the end of the line.

If the source being compiled is ‘C’ source, then comments can either be traditional multi-line/in-line C style comments /* .. */.

C++ style comments are also supported, which behave in the same way as ASM comments except that the comment begins with the sequence //.

Multiple definitions may be provided for the same address in the ECU. This allows both aliasing of names and it also means that different GIN objects can be set up to control individual bits of an ECU object.

Comments are scanned for definitions that are flanked by square brackets and may contain a comma separated list:

1// [WORDWRITES]
2uint8_t gear_wg_mod; // [Gear WG Mod,%,100,,r,2,f,,,]

For some definitions, the comma count dictates the information type:

Type Number of Commas
Options 8
Channels 9
Tables 13
Maps 18

All other definitions have a tag for their first field and can have an arbitrary number of commas:

1// [USERSCALAR,Load Units,kPa,y,,,]