3.6.3 Assembly Language Scanner
Assembly languages use a variety of commenting conventions, and allow a
variety of special characters to dirty up local symbols,
preventing name space conflicts with symbols defined by higher-level
languages. Also, some compilation systems prepend an underscore to
external symbols. The options listed below are designed to address
these differences.
- ‘-c character-class’
- ‘--comment=character-class’
-
The characters in character-class are considered left delimiters
for comments that extend until the end of the current line.
- ‘-k character-class’
- ‘--keep=character-class’
-
Consider the characters of character-class as valid constituents of
identifier names. For example, if you are indexing assembly code that
prepends ‘.’ to assembler directives, and prepends ‘%’ to
register names, you can keep these characters in the tokens by specifying
‘--lang-option=asm:--keep=.%’, or ‘-l asm:"-k .%"’.
- ‘-i character-class’
- ‘--ignore=character-class’
-
Consider the characters of character-class as valid constituents
of identifier names, but discard all tokens containing these characters.
For example, if you don't want to clutter your ID database with
assembler directives that begin with a leading ‘.’ or with
assembler labels that contain ‘@’, use
‘--lang-option=asm:--ignore=.@’, or ‘-l asm:"-i .@"’.
- ‘-u’
- ‘--strip-underscore’
-
Strip one leading underscore from identifiers. This option is useful if
your compilation system prepends an underscore to external symbols. By
stripping the underscore, you can canonicalize such names and bring them
into conformance the way they are expressed in the C language. By
default, the leading underscore is retained.
- ‘-n’
- ‘--no-cpp’
-
Do not recognize C preprocessor directives. By default, such lines are
handled in the same way as they are by the C language scanner.