Path: utzoo!attcan!uunet!shakti!shri From: shri@ncst.ernet.in (H.Shrikumar) Newsgroups: comp.lang.forth Subject: Re: Interpret/compile consistency Message-ID: <979@shakti.ncst.ernet.in> Date: 2 Oct 90 11:57:21 GMT References: <9009220119.AA14290@ucbvax.Berkeley.EDU> Reply-To: shri@shakti (H.Shrikumar ) Organization: National Centre for Software Technology, Bombay, INDIA Lines: 36 In article <9009220119.AA14290@ucbvax.Berkeley.EDU> wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV writes: > >> How about? IF [ : ... ; ] THEN >> Or? IF [ : ... [ : ... ; ] ... ; ] THEN 8^) > >No > >Nested brackets, and colon definitions nested within control structures, >are outside the scope of what I was trying to accomplish. In order to >support nested brackets/colon-definitions, one must dispense with the >traditional notion of STATE as a global variable. I plan to do this in myForth. Well, actually I am trying to get rid of STATE. The definition of a word in myForth is allowed to have other word definitions within, Pascal style, recursively. Dictionary searches while compiling a word begin with the local definitions which therefore over-ride the top-level definition of the same ideogram. The compiler is not overly complicated, since I have precisely one context-free construct ( ... ). While compiling, myForth compiler would first compile the innermost definition, and proceed outward in level of nested parens. The link field of each top-level ideogram would skip all the local definitions and keep them invisible. Am I headed for big trouble with this ? (This being my first go a post-fixing, I am a bit nervous.) -- shrikumar ( shri@ncst.in ) Disclaimer: myForth is just in the works, admittedly my syntax needs some more cleaning up, so I avoid giving a concrete example at this stage.