Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!dsl.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Input Stream Message-ID: <1624.UUL1.3#5129@willett.pgh.pa.us> Date: 29 Aug 90 02:38:24 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 46 Category 3, Topic 45 Message 2 Mon Aug 27, 1990 R.BERKEY [Robert] at 21:39 PDT > This is to be used in the form IF( c1 e1 ... ck ek )IF The solutions given to this problem depend on the source code being on one line. Let's pretty print it: This is to be used in the form: IF( c1 e1 ... ck ek )IF Now what? Here's another recent example of a compiler, from Doug Philips: > Message-ID: <1569.UUL1.3#5129@willett.pgh.pa.us> > Date: Wed, 22 Aug 90 20:53:31 EDT > CLASS Foo > METHOD m1 ( code for method m1. ) > METHOD m2 ( ... ) > METHOD m3 ( ... ) > ENDCLASS > > The above code can compile into a series of if-then tests, much > like Wavrik's recently posted IF( )IF might. The SEND method (in > my scheme) pops the object, arranges for it to be the result of > SELF, which leaves the message name on the top of stack. It then > jumps to the if-then code above (based on information gotten from > the object). The code then figures out which method to invoke, if > it finds one, it executes it and returns. If the code falls > through to ENDCLASS, ENDCLASS could arrange for a search of the > super-classes dictionary, or whatever. Robert ----- This message came from GEnie via willett through a semi-automated process. Report problems to: uunet!willett!dwp or dwp@willett.pgh.pa.us