--- gforth/gray.fs 2000/09/23 15:46:56 1.7 +++ gforth/gray.fs 2012/11/28 02:30:59 1.14 @@ -1,23 +1,24 @@ \ recursive descent parser generator ) -\ Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997,2000,2003,2007,2008 Free Software Foundation, Inc. \ Copyright 1990, 1991, 1994 Martin Anton Ertl -\ This program is free software; you can redistribute it and/or modify -\ it under the terms of the GNU General Public License as published by -\ the Free Software Foundation; either version 2 of the License, or -\ (at your option) any later version. - -\ This program is distributed in the hope that it will be useful, -\ but WITHOUT ANY WARRANTY; without even the implied warranty of -\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -\ GNU General Public License for more details. - -\ You should have received a copy of the GNU General Public License -\ along with this program; if not, write to the Free Software -\ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. +\ This file is part of Gforth. -\ ANS FORTH prolog +\ Gforth is free software; you can redistribute it and/or +\ modify it under the terms of the GNU General Public License +\ as published by the Free Software Foundation, either version 3 +\ of the License, or (at your option) any later version. + +\ This program is distributed in the hope that it will be useful, +\ but WITHOUT ANY WARRANTY; without even the implied warranty of +\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +\ GNU General Public License for more details. + +\ You should have received a copy of the GNU General Public License +\ along with this program. If not, see http://www.gnu.org/licenses/. + +\ ANS FORTH prologue : defined? ( "word" -- flag ) bl word find nip ; defined? WARNINGS 0= @@ -28,10 +29,6 @@ warnings on \ end of ANS FORTH prolog -warnings @ [IF] -.( Loading Gray ... Copyright 1990-1994 Martin Anton Ertl; NO WARRANTY ) cr -[THEN] - \ misc ) : noop ; @@ -745,9 +742,13 @@ constant nt-syntax-expr : generate-nt \ -- ) \ generates a call to the code for the rule ) \ since the code needs not be generated yet, an indirect call is used ) - exec postpone literal - postpone @ - postpone execute ; + exec dup @ if + @ compile, + else + postpone literal + postpone @ + postpone execute + endif ; : pass2-nt \ -- ) \ apart from the usual duties, this pass2 also has to code-nt )