OOP Compiling

richards@eng.auburn.edu (Eric J. Richards)
30 Jul 91 12:34:39 CDT

          From comp.compilers

Related articles
OOP Compiling richards@eng.auburn.edu (1991-07-30)
| List of all articles for this month |

Newsgroups: comp.compilers
From: richards@eng.auburn.edu (Eric J. Richards)
Keywords: OOP, C++, parse
Organization: Auburn University Engineering
Date: 30 Jul 91 12:34:39 CDT



      Do you know of any references / ftp postings relating to object-
oriented compiling? I'm interested in representing a grammar via
a class library. Perhaps some background...
      As part of my thesis, I'm creating a user-interface design
language. The output of parsing will be the C++ implementation of
the specified user-interface. I want the elements of the interface
to be expandable -- via subclassing from the provided elements.
To work this into the language, I'm musing making the language parsed
by objects that representing elements of the language.
      For instance,: have an object represent a non-terminal -- a variable.
All derivations of the object represent the variable's productions.
As variables are visited, the productions are each given a chance to
parse (I'm writing this in C++, so productions would be registered
for a variable object during constructor time).
      I imagine that rather than visiting all the productions at parse
time a method could be provided to build the proper tables before
parsing. Anyway. The key is that all one would have to do to
extend the grammar, to add new productions, is to derive and provide
new objects -- no need to rebuild the grammar, just relink with the
new guys and re-execute.
      I don't really want to use yacc / lex or yacc++, since they
require modification of the grammar. I'm looking for run-time
grammar specification.
      So... if you know of any related articles relating to this,
please let me know. If you hate OOP compiling and feel like sharing
your views, let me know. If I accumulate a reasonable amount of replies
(either positive or negative) I'll post a summary.


--
Eric Richards, Auburn University
InterNet: richards@eng.auburn.edu
--


Post a followup to this message

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