last modified: 04-SEP-1992 | catalog | categories | new | search |

NESC9480 INTERP

INTERP, Lexical Analysis for Problems Oriented Language Development

top ]
1. NAME OR DESIGNATION OF PROGRAM:  INTERP (subroutine system for
lexical analysis).
top ]
2. COMPUTERS
To submit a request, click below on the link of the version you wish to order. Only liaison officers are authorised to submit online requests. Rules for requesters are available here.
Program name Package id Status Status date
INTERP NESC9480/01 Tested 04-SEP-1992

Machines used:

Package ID Orig. computer Test computer
NESC9480/01 DEC VAX 8700 DEC VAX 8810
top ]
3. DESCRIPTION OF PROGRAM OR FUNCTION

INTERP is a free format data interpretation subroutine system for lexical analysis. The system is flexible, easy to use, small, and efficient and simplifies the development of a problem oriented language (POL) as well as any other translation preprocessor for an application program. INTERP is currently being used to interpret POL translators for both engineering analysis codes and utility programs. The application callable part of the INTERP subroutine system consists of the configuration routines, the interrogation routines, the logical testing functions, the utility routines, the advanced operations routines, and a string handling library. INTERP processes textual information in the form of strings, which are a primary means of data exchange between INTERP and the application program. The INTERP system can be configured to read data directly from a file opened by the application program or the application program. The INTERP system can be configured to read data directly from a file opened by the application program or the application program may read the data file directly and pass the data to the INTERP system by means of a utility routine.
top ]
4. METHOD OF SOLUTION

INTERP is a lexical analyzer which examines a data line with no prior knowledge of what it contains and informs the application program of what was found. Each data line typically  consists of a collection of special characters and tokens. A token is defined to be an identifiable unit of information. Each new data  line is loaded into an internal line buffer and examined one character at a time until a complete token is read. At this time control is returned to the application program which uses the INTERP logical testing functions to identify the token.Once the identification is made, INTERP continues processing the data line until it reaches the end-of-line. INTERP is then given a new line and the process is repeated. INTERP recognizes three classes of tokens - numeric, textual, and position identifying. These are further divided into eight types: integer, real, double precision, text, separator, string, end-of-line and end-of-file. INTERP recognizes six types of special characters: delimiters, separators,  the comment character, the escape character, and two types of continuation characters. The characters available to be used as one  of these six types of special characters can be redefined through a
simple subroutine call.
top ]
5. RESTRICTIONS ON THE COMPLEXITY OF THE PROBLEM

        Maxima of -
     256 tokens per line
     256 macros
     132 characters per output record
      32 macros per line
       3 INTERP states
While these parameters have been chosen to support a fairly large grammar, they can be changed easily. INTERP assumes it is functioning in an environment using the ASCII character set. Two versions of each routine are needed, one to convert a single character and one to convert a string.
top ]
6. TYPICAL RUNNING TIME:  Execution time is application dependent.
NESC9480/01
NEADB compiled the program on a DEC VAX 8810n computer  and ran the test case included in this package in about one second of CPU time.
top ]
7. UNUSUAL FEATURES OF THE PROGRAM

INTERP is portable and will run with little or no modification on any computer which uses the ASCII  character set. Programmers will find it quite easy to learn to use INTERP effectively and to custom configure it to their application software through simple subroutine calls.
top ]
8. RELATED AND AUXILIARY PROGRAMS

COMPRO, an enhanced general purpose parser, uses INTERP as its lexical analyzer. COMPRO should be used (instead of INTERP) to process a program's input if the input is command line structured (i.e., if it consists of command lines containing command names, keywords, and data).
top ]
9. STATUS
Package ID Status date Status
NESC9480/01 04-SEP-1992 Tested at NEADB
top ]
10. REFERENCES

- INTERP, NESC No. 9480,
  INTERP Tape Description,
  National Energy Software Center Note 89-51, May 24, 1989.
- K.J. Perano,
  COMPRO - A Subroutine System for Syntactical Analysis,
  SAND89-8441, in publication.
NESC9480/01, included references:
- K.J. Perano and V.N. Kaliakin:
  INTERP - A Fortran Callable Free Format Data Interpretation
  Subroutine System
  SAND87-8244 UC-13 (March 1989).
- V.N. Kaliakin and K.J. Perano:
  INTERP - A Fortran Callable Data Interpretation Subroutine System
  Reprint from Adv. Eng. Software Vol. 10, No. 3, PP. 136-142 (1988)
top ]
11. MACHINE REQUIREMENTS

A typical INTERP configuration requires approximately 15 kilobytes of memory.
top ]
12. PROGRAMMING LANGUAGE(S) USED
Package ID Computer language
NESC9480/01 FORTRAN-77
top ]
13. OPERATING SYSTEM UNDER WHICH PROGRAM IS EXECUTED:  VMS 4.7.
NESC9480/01
VMS 5.3 (VAX 8810).
top ]
14. OTHER PROGRAMMING OR OPERATING INFORMATION OR RESTRICTIONS

The
only FORTRAN 77 extension used by INTERP is the dollar sign editing  - i.e., the use of the dollar sign as the Fortran carriage control character to suppress carriage returns on lines sent to the terminal. This feature allows the cursor to remain on a line following a prompt. It is used only in the STRPUT routine.
top ]
15. NAME AND ESTABLISHMENT OF AUTHORS

  K.J. Perano and V.N. Kaliakin
  Solid Mechanics Division
  Sandia National Laboratories
  Livermore, U.S.A.
top ]
16. MATERIAL AVAILABLE
NESC9480/01
File name File description Records
NESC9480_01.001 Information file 53
NESC9480_01.002 INTERP.FOR 4204
NESC9480_01.003 CINTERP.INC 7
NESC9480_01.004 CSETUP.INC 44
NESC9480_01.005 NUMBER.INC 16
NESC9480_01.006 AREA.FOR 82
NESC9480_01.007 AREA.DAT 12
NESC9480_01.008 INTERPBLD.COM 3
NESC9480_01.009 AREABLD.COM 3
NESC9480_01.010 INTERP.FTN 7122
NESC9480_01.011 AREA.PRT 1
top ]
17. CATEGORIES
  • P. General Mathematical and Computing System Routines

Keywords: FORTRAN, data analysis, interpreters, programming languages, translators.