Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Symbol Table Based Program Editor

IP.com Disclosure Number: IPCOM000121983D
Original Publication Date: 1991-Oct-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 6 page(s) / 202K

Publishing Venue

IBM

Related People

Fawcett, BW: AUTHOR

Abstract

Described is a program editor that abstracts the source code statements into a hierarchical structure based on the compiler notion of symbol tables. This makes the application structure readily visible to the programmer. It also provides a means of performing intelligent syntax generation and verification on a language construct by construct basis.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 36% of the total text.

Symbol Table Based Program Editor

      Described is a program editor that abstracts the source
code statements into a hierarchical structure based on the compiler
notion of symbol tables.  This makes the application structure
readily visible to the programmer.  It also provides a means of
performing intelligent syntax generation and verification on a
language construct by construct basis.

      It describes how the compiler concepts of grammar parsing and
symbol tables management can be combined with the source editor to
form a synergistic program development tool.

      Because every source statement is uniquely a part of only one
symbol definition, the source file can be abstracted into a symbol
table structure.  Since the source program can have nested symbol
declares, the symbol table may be a many-branched tree-like
structure.

      This symbol table structure allows the programmer to control
how much of the programming details of this application are displayed
at any one time.  An example of this symbol table structure for a
sample program and a possible abstraction view of it are shown in
Fig. 1.  For this illustration, the PL/1 based expert system
KnowledgeTool* language is used.

      Upon initial editor invocation, the source statements are
parsed and the equivalent symbol table structure is created.  A
graphical depiction of this structure is displayed to the user.  The
user can perform some view customization on this display.  For
example, the user can select to only display the first two nesting
levels, and to hide the lower nesting levels.

      From the symbol table structure display shown in Fig. 2, the
user may open a symbol edit window for a symbol by selecting it in
the tree.  Here is the symbol edit window for the MainProc symbol
from the sample program.

      In the sample symbol edit window shown in Fig. 3, the four list
boxes at the top of the window show a list of the various symbol
declares that are declared directly within the current symbol.  They
are sorted by symbol type.  To edit one of these, select them in the
list, and a symbol edit window is opened for them.  The source window
at the bottom of the symbol edit window displays the current source
statements that define the current symbol.  These source statements
may be edited directly through normal edit means (keyboard, mouse),
or may be edited via more sophisticated syntax generation means as
described later in this article.

      There may be many symbol edit windows open upon the screen at
one time.  This is under the discretion of the user as to what
symbols are important at the time.

      The difficulty in providing this symbol abstraction capability
lies in the fact that the normal compiler front-end modules (the
lexical analyzer and parser) lose the connection between source
statements and grammar objects very early in the parsing phase.  Once
the lexical analyzer retrieves the token from the...