Related articles |
---|
object oriented implementations of rec. descent parsers hnkst2+@pitt.edu (1996-10-10) |
Re: object oriented implementations of rec. descent parsers scotts@metaware.com (Scott Stanchfield) (1996-10-12) |
Re: object oriented implementations of rec. descent parsers parrt@MageLang.com (Terence Parr) (1996-10-12) |
Re: object oriented implementations of rec. descent parsers wolff@inf.fu-berlin.de (1996-10-12) |
Re: object oriented implementations of rec. descent parsers anund@rebecca.nr.no (1996-10-15) |
Re: object oriented implementations of rec. descent parsers dlmoore@ix.netcom.com (David L Moore) (1996-10-15) |
Re: object oriented implementations of rec. descent parsers Hans.Walheim@Nexus.SE (Hans T Walheim) (1996-10-16) |
From: | wolff@inf.fu-berlin.de (Thomas Wolff) |
Newsgroups: | comp.compilers |
Date: | 12 Oct 1996 22:17:16 -0400 |
Organization: | Freie Universitaet Berlin |
References: | 96-10-033 |
Keywords: | parse, OOP |
: I'm trying to find source code examples that implement recursive descent
: parsers in an object oriented language (C++ / smalltalk).
I wrote a recursive-descent parser for Eiffel in Eiffel. (If you're
interested to see the source, drop me a mail.) At this point, I'd
like to point out that this approach exhibits one of the problems of
the dogmatic flavour of object orientation (as represented by Eiffel)
in a systematic deficiency. Whenever you want to call a routine of a
class meant to handle a certain syntactic structure to detect if that
structure can be recognized for parsing, you need an object of that
class first - just to be able to call that function! If the checked
structure is not the right one to continue parsing, the object can be
discarded (which would otherwise store syntax node information). So
recursive-descent parsing is an example to show that imposing too much
programming style restriction by languages does not always help.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.