Accession Number : ADA132874

Title :   TREGRM-83 Report and User's Manual.

Descriptive Note : Interim technical rept.,


Personal Author(s) : Clemm,Geoffrey M

PDF Url : ADA132874

Report Date : Jan 1983

Pagination or Media Count : 37

Abstract : The first phase of the analysis of a computer program is lexical analysis, where the source text is broken up into the words or tokens, of the programming language. The second phase is syntactic analysis of parsing, where structure of the program is determined. The result of parsing is often a sequence of calls to a semantic routine with a reduction number or action number as the argument. To provide a more structured interface between the syntactic analysis and semantic analysis of a program, a parse tree can be created, where the parse tree is a flattened (simplified) version of the derivation tree for that program. To support the production of parse tree for generators, the TREGRM System was developed. TREGRM is a language for specifying the creation of parse trees for any current programming language, including FORTRAN. This report describes the TREGRM language, a complier for the language, and an interpreter for the resulting object code. The interpreted object code, in conjunction with a lexical analyzer, forms a syntactic analyzer that takes as input a stream of characters and produces as output a parse tree. The complier and interpreter are designed for portability. Both are written in ANSI FORTRAN supplemented by a small number of short machine dependent subroutines. Included is a TREGRM program describing the syntax of FORTRAN-77.

Descriptors :   *Programming languages, *User manuals, Coding, Computer programs, Compilers, Interpreters, Lexicography, Analyzers, Fortran, Syntax, Semantics, Parsers, Interfaces, Trees

Subject Categories : Computer Programming and Software

Distribution Statement : APPROVED FOR PUBLIC RELEASE