New Tools for Language Processor Development

xorian@solomon.technet.sg (Xorian Technologies)
Mon, 11 May 1992 09:26:35 GMT

          From comp.compilers

Related articles
New Tools for Language Processor Development xorian@solomon.technet.sg (1992-05-11)
| List of all articles for this month |

Newsgroups: comp.compilers
From: xorian@solomon.technet.sg (Xorian Technologies)
Keywords: tools, C++
Organization: Compilers Central
Date: Mon, 11 May 1992 09:26:35 GMT

Xorian Technologies Pte. Ltd. has available a comprehensive translator
generator toolkit LADE (LAnguage Definition Environment, pronounced
lay-dee). LADE is a powerful line of tools intended to aid in the design
and development of language processors including compilers, translators
and interpreters for computer languages, 4th generation languages (4GLs),
and application front ends in C++.


LADE is not yet another Yacc clone. While subsuming the capabilities of
Yacc, it goes far beyond that which has heretofore been provided in
production quality translator-generator tools. LADE supports the
development of all phases of language design and implementation including
lexical, syntactic, and semantic analysis, as well as code generation.


Among the more notable features of LADE:


    o Genuine Regular Expression LALR(1) Grammars


        LADE grammars are regular-LALR(1) which means, for example, that
        instead of writing:
            x -> a | x a ;
        you can write:
            x -> [x] a ;
        or even:
            {a}
        instead of x. Moreover, this regularity is not a transformation on the
        source grammar but is intrinsic to the state machine which is
        generated. As a result, not only do regular expressions not introduce
        conflicts which may result from a simple trasformation on the grammar,
        but regular expressions may actually remove conflicts by deferring
        shift-reduce and reduce-reduce decisions by the parser until the
        regular expression is completely read. Regular expressions
        significantly reduce the size and complexity of languages and reduce the
        requirements for additional intermediate representations for semantic
        analysis as well as facilitating the design of new languages.


        Regular expressions are fully supported in the translator specification
        which is extremely important when the length of a production is unknown
        at run-time. Instead of referring to elements by their offset on the
        parser stack, they are referred to by name.


    o Context Sensitivity


        LADE grammars may be supplemented by context sensitive tests. The
        computation of these tests are defined in the translator specification
        and, therefore, have full access to all lexical, syntactic, and
        semantic information. The result of the test determines whether a
        given production should be reduced or not. For example, an Ada
        function call may be distinguished from an array reference by testing
        for a compatible declaration for each.


        Using context-sensitive tests and regular expressions, a C++ parser
        has been produced with zero (0) shift-reduce and zero (0) reduce-reduce
        conflicts using essentially the grammar described in The Annotated
        Reference Manual for C++.


    o Fully Automatic Syntactic Error Recovery Generation


        Every language processor produced by LADE automatically detects,
        reports, and recovers from syntactic errors. Automatic syntactic error
        may be fine tuned by affixing specific costs associated with the
        addition or deletion of specific lexemes.


    o GUI-based Grammar and Parser Debuggers


        The parser debugger, LADEBug, allows a running parser to be traced and
        examined. It presents a visual representation of an executing parser
        and takes advantage of a graphical user interface to provide ease of
        use, as well as organizes the debugging information logically for
        easy reference and access. Each parser action taken by the parser may
        be traced and stepped through. Breakpoints may be set such that the
        parse will stop at the set condition. The current lookahead symbol
        and its location in the input is dynamically marked and updated. The
        parse stack is visually represented and is dynamically updated. Values
        of elements on the parse stack may have their attribute values examined.


        The grammar debugger is a generate time debugger that is used to examined
        shift reduce and reduce reduce conflicts. Conflicts are systematically
        organized and may be examined in detail. A trace of how the conflicting
        symbol is introduced and how the conflict derives us used to provide
        the user with more information on the conflict. In addition, state and
        production information may be easily called up for quick reference.


    o Translator Modularity for Layered Reuse


        LADE may be used to specify translator modules which may be reused
        either vertialy, by adding new nonterminals and productions, or
        horizontally by attaching additional semantics to previously defined
        nonterminals and productions. For example, an ANSI C semantic checking
        module may be reused to specify either a compiler front end or a
        preprocessor.


    o Integral Object-Oriented Design


        LADE utilizes object-oriented design in a number of ways including the
        language processor objects and the organization of the translator
        modules.


    o Reentrant and Multiple Parser Instances


        Because each language processor generated by LADE is a first-class C++
        object, an application may contain an arbitrary number of such
        processors and may recursively re-invoke the parser.


    o Attribute-Based Semantic Support


        Language processor semantics are specified by an essentially
        L-attributed specification. Additionaly, dynamic attributes may be
        attached to nonterminals to perform multi-pass analysis and code-
        generation.


    o Translator Specification is a Superset of C++


        The attribute-based specification is a superset of C++. Semantic actions
        may be specified as C++ expressions or compound statements and C++
        declarations may be included in the translator specifications.


    o LADE is defined in LADE


        LADE largely consists of a set of language processors each of which is
        defined in LADE.




Availability


LADE is currently available for the Sun Microsystems Sparcstation
processor and requires OpenLook for its debugging tools. Support for
other platforms will be available soon where interest is indicated.


LADE will begin shipping by the end of May 1992. For further
information or a demo kit, contact:


Xorian Technologies Pte. Ltd.
389A Balestier Road
Singapore 1232
Republic of Singapore
Tel: (65)256-1532, Fax: (65)253-7709, email: xorian@solomon.technet.sg
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.