Contents

Previous

Next


Predefined Language Conventions

Source-Navigator does not invoke a compiler to build its databases; instead, it has a plug-in parser for each language it supports. For details on how to add plug-in parsers to Source-Navigator, see The Parser Toolbox Library.

Predefined Parsers

Source-Navigator was designed to support not only the most common software development languages, but to support them together. With Source-Navigator you can follow references from a C++ method to a FORTRAN subroutine, and even to assembly language. To accomplish this task efficiently, Source-Navigator shares terms between multiple languages, even when the languages are defined in different terms.

For example, a C struct is represented in Source-Navigator as a class; there is no separate struct type for C. By unifying these terms, Source-Navigator greatly simplifies both the task of multi-language code comprehension and its own internal organization.

The C and C++ Parser

This parser understands C++, K&R C, and ANSI C languages, including the pre-processor directives. Pre-processing is not necessary to parse C or C++ source code. During project creation a default include search path is created that has the same role as the -I option for the C pre-processor. The include search path can be modified during project creation or from the File menu by selecting Project Preferences -> Include.

The FORTRAN Parser

The FORTRAN parser understands the FORTRAN 77 syntax, plus extensions such as record, structure, and include. The usual FORTRAN extensions are understood by the parser as well. The include search path has the same role as the -I option for the C pre-processor. The include search path can be modified during project creation or from the File menu by selecting Project Preferences -> Include.

The FORTRAN structure declaration is mapped by the tools to a class. Structure members are treated as instance variables.

The COBOL Parser

The COBOL parser understands these dialects: ANSI '74 Standard, ANSI '85 Standard (ANSI X3.23-1985), IBM OS/VS COBOL, IBM VS COBOL II, IBM SAA COBOL/370, IBM DOSVS COBOL, X/Open, and Micro Focus COBOL.

The Tcl and [incr Tcl] Parser

The Tcl parser understands all versions of Tcl/Tk through version 8.1. In addition, it understands [incr Tcl] versions 1.5 and 2.x.

The Java Parser

The Java parser understands Java 1.0.

The PowerPC assembly Parser

The PowerPC assembly parser understands model number 601 assembly language.

Note

The empty areas of Type Definitions for Supported Languages represent types that don't exist in each language.

Type Definitions for Supported Languages

Type
Abbrev.

C/C++ and Java

FORTRAN

COBOL

Tcl

[incr Tcl]

PowerPC assembly

cl

Class, Struct

Structure

Structure

Namespace

Class

 

com

 

Common Block

 

 

 

 

cov

 

Common variable

 

 

 

 

con

#define1
const2
static final3

Constant

 

 

 

Const

e

Enum

 

 

 

 

 

ec

Enum value

 

 

 

 

 

fd

Function declaration

 

 

 

 

 

fr

Friend

 

 

 

 

 

fu

Function

Function,
Label

Function, Label

Procedure

Procedure

Function

gv

Global
variable

 

Global
variable

Global
variable

Global
variable

Global
variable

iv

Instance variable

Instance
variable4

Instance
variable 5

Namespace variable

Instance
variable

 

lv

Local
variable

 

 

Local
variable

Local
variable

 

ma

Macro

 

 

 

 

Macro

md

Method declaration

 

 

 

 

 

mi

Method implementation

 

 

Namespace procedure

Method implementation

 

su

 

Subroutine

 

 

 

 

t

Typedef

 

 

 

 

 

un

Union

 

 

 

 

 


1. In C and C++. Return to text.

2. In C and C++. Return to text.

3. In Java. Return to text.

4. For structure members. Return to text.

5. For structure members. Return to text.


Contents

Previous

Next