Identifiers, Keyword, and Typedef Names

The debugger uses the normal language lookup rules for identifiers, (obeying scopes, and so on,) but also extends those rules as follows:

These rules can be subverted by rescoping the name.

NOTE:

The debugger does not know where in the source code for a scope a declaration occurred, so all lookups will consider all the identifiers in a given scope, whether the identifier's definition occurred before or after the current line.

The lexical tokens for identifiers are specific to the current language, and also to the current lexical state.

IDENTIFIER

: identifier for LSIGNAL lexical state

| identifier for C

| identifier for C++

| identifier for Fortran

TYPEDEFnames are lexically just identifiers, but when looking them up in the current scope, the debugger determines that they refer to types, such as TYPEDEFs, classes, or structs. This information is needed to correctly parse C and C++ expressions.

TYPEDEFname

: IDENTIFIER

A few lexical tokens act as embedded keywords in some positions within expressions, but the debugger generally tries to accept them as though they were normal identifiers.

identifier-or-key-word

: IDENTIFIER

| embedded-key-word

embedded-key-word

: ANY

| CHANGED

| READ

| WRITE

In other contexts, the debugger is also prepared to accept TYPEDEFnames (for example, int or the name of a class).

identifier-or-typedef-name

: identifier-or-typedef-name for C

| identifier-or-typedef-name for C++

| identifier-or-typedef-name for Fortran