\
\ VNPForth - Compiled native Forth for IA32 Linux systems
\ Copyright (C) 2001  Simon Baldwin (simonb@caldera.com)
\
\ 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-1307, USA.
\

\
\ Test data.  Each line of this file constitutes a self contained test
\ for the Forth compiler.  Split into files, and attempt to compile each
\ separate test file.  Each compile should fail in one way or another.
\
0 CONSTANT 12345
0 CONSTANT CONSTANT
0 CONSTANT BEGIN
VARIABLE 12345
VARIABLE VARIABLE
VARIABLE BEGIN
CREATE 12345 1 CELLS ALLOT
CREATE CREATE 1 CELLS ALLOT
: BEGIN ;
: ;
CODE BEGIN END-CODE
CODE END-CODE
IF
IF 0 THEN -1 ELSE
THEN -1
ELSE -1 THEN
DO
?DO
LOOP
+LOOP
UNTIL
AGAIN
REPEAT
WHILE
CASE -1 OF ENDOF
-1 OF ENDOF
ENDOF
ENDCASE
C1 VARIABLE C1
C2 CREATE C2 1 CELLS ALLOT
VARIABLE C3 VARIABLE C3
CREATE C4 1 ALLOT CREATE C4 1 ALLOT
VARIABLE C5 CREATE C5 1 ALLOT
CREATE C5 1 ALLOT VARIABLE C5
CREATE C6 INVALID ALLOT
C7 0 CONSTANT C7
0 CONSTANT C8 0 CONSTANT C8
CREATE CA 0 CELLS ALLOT
CREATE CB 0 CHARS ALLOT
CREATE CC -1 CELLS ALLOT
CREATE CD -1 CHARS ALLOT
: W1 ; : W1 ;
: W2 ; VARIABLE W2
: W3 ; CREATE W3 1 ALLOT
VARIABLE W4 : W4 ;
CREATE W5 1 ALLOT : W5 ;
RECURSE
VARIABLE TYPE ." HELLO"
-2147483649
4294967296
LEAVE
                     EXIT
