Next: , Up: Controlling Symbol Types   [Contents][Index]


6.1 Syntactic classes

Generally speaking, the syntactic class of a symbol defines where in the C code this symbol can legitimately appear. There are following classes:

declaration

This keyword starts a declaration of its own. It is followed by an opening parenthesis, arbitrary list of expressions, closing parenthesis and optional semicolon.

The declaration class is designed for use with such entities as C11 _Static_assert keyword.

identifier

A C identifier.

keyword
kw

A keyword, like ‘if’, ‘when’ etc.

modifier

Type modifier, i.e. the symbol appearing after a data type to modify its meaning, like ‘*’.

qualifier

Declaration qualifier. Can appear both before C declaration (much like ‘static’ or ‘extern’) and after a data type (like modifiers).

You would usually declare a gcc keyword ‘__extension__’ as a qualifier:

--symbol __extension__:qualifier
type

A C data type, like ‘int’, ‘char’, etc.

wrapper

That has two meanings. First, it can be used to declare parameter wrappers when running cflow without preprocessor. This usage was described above. Second, it indicates any symbol that can appear in a declaration either before an identifier or before a terminating semicolon and optionally followed by a parenthesized expression list.

We recommended to use this class for the gcc__attribute__’ keyword.