Next: , Previous: Language map, Up: Extraction options


3.6.2 C Cpp Java Language Scanner

The C scanner is the most commonly used. Files that match the glob pattern *.h, *.c, as well as yacc files that match *.y or *.yacc, and lex files that match *.l or *.lex, are processed with this scanner.

Scanner-specific options (Note, these options are presented without the required ‘-l’ or ‘--lang-option=’ prefix):

-k character-class
--keep=character-class
Consider the characters in character-class as valid constituents of identifier names. For example, if you are indexing C code that contains ‘$’ in some of its identifiers, you can include these by using ‘--lang-option=C:--keep=$’, or ‘-l C:"-k $"’ (if you don't like to type so much).
-i character-class
--ignore=character-class
Consider the characters in character-class as valid constituents of identifier names, but discard all tokens containing these characters. For example, if some C code has identifiers containing ‘$’, but you don't want these cluttering up your ID database, use ‘--lang-option=C:--ignore=$’, or the terser equivalent ‘-l C:"-i $"’.
-u
--strip-underscore
Strip one leading underscore from C identifiers encapsulated as character strings. This option is useful if you are indexing C code that contains symbol-table name strings for systems that prepend an underscore to external symbols. By default, the leading underscore is retained.