# $Id: asttest0.flt,v 1.1 2023/02/21 23:16:09 leavens Exp $ float pi; { pi = 3.14159; write pi; } float pi; { pi = 3.141590; write pi; } # $Id: asttest1.flt,v 1.3 2023/03/29 23:52:44 leavens Exp leavens $ bool b, c, d; bool e, f, g, h; float x, y, z; float w, q, r; { w = +0; q = -0.0; e = 2.73e+0; f = 5e22; g = -66754321E-322; r = -10.123456789e4; b=-3402==q; if (w < r) write q; h = e-f-g; } bool b; bool c; bool d; bool e; bool f; bool g; bool h; float x; float y; float z; float w; float q; float r; { w = 0.000000; q = 0.000000; e = 2.730000; f = 49999998890981541806080.000000; g = -0.000000; r = -101234.570312; b = (-3402.000000 == q); if ( (w < r) ) write q; h = ((e - f) - g); } # $Id: asttest2.flt,v 1.1 2023/02/21 23:29:34 leavens Exp $ float x, y; float z, w, q; bool b; bool h; { x = 0.0001e-3; y = x / 1.0 / 2.5e2; w = x + (0 - y) --3.14; b = x < y; h = !h < b; } float x; float y; float z; float w; float q; bool b; bool h; { x = 0.000000; y = ((x / 1.000000) / 250.000000); w = ((x + (0.000000 - y)) - -3.140000); b = (x < y); h = ((!h) < b); } # $Id: asttest3.flt,v 1.1 2023/02/22 02:28:35 leavens Exp $ bool h; float x, y; bool b; { x = +1.001002003e1; y = -21.0345678e-1; b = (x + 7*3 - 4 - 5.0) < 7.3/3.9 - 4.5e-2; b = !!b; if (!!!!b) if (x < y) if (x <= y) if (y==x) if (y != x) write b; } bool h; float x; float y; bool b; { x = 10.010020; y = -2.103457; b = ((((x + (7.000000 * 3.000000)) - 4.000000) - 5.000000) < ((7.300000 / 3.900000) - 0.045000)); b = (!(!b)); if ( (!(!(!(!b)))) ) if ( (x < y) ) if ( (x <= y) ) if ( (y == x) ) if ( (y != x) ) write b; } # $Id: asttest4.flt,v 1.1 2023/02/22 14:00:53 leavens Exp $ float x; bool b; float y; bool c; { { if (!!b) { read x; read y; write x+y*3 + 1; if (x <= y) { if (y!=x) { write 100.001*y; } } } } } float x; bool b; float y; bool c; { { if ( (!(!b)) ) { read x; read y; write ((x + (y * 3.000000)) + 1.000000); if ( (x <= y) ) { if ( (y != x) ) { write (100.000999 * y); } } } } } # $Id: asttest5.flt,v 1.2 2023/03/29 23:52:44 leavens Exp leavens $ float x; { bool c; { bool b; float y; if (!!b) { read x; read y; write x+y*3 + 1; if (x <= y) { if (y!=x) { write 100.001*y; } } } } } float x; { bool c; { bool b; float y; if ( (!(!b)) ) { read x; read y; write ((x + (y * 3.000000)) + 1.000000); if ( (x <= y) ) { if ( (y != x) ) { write (100.000999 * y); } } } } } # $Id: declerrtest0.flt,v 1.1 2023/02/22 03:33:43 leavens Exp $ float x; float x; write x; float x; float x; write x; declerrtest0.flt: line 3, column 7: float "x" is already declared as a float # $Id: declerrtest1.flt,v 1.1 2023/02/22 03:33:43 leavens Exp $ bool x; float x; write x; bool x; float x; write x; declerrtest1.flt: line 3, column 7: float "x" is already declared as a bool # $Id: declerrtest2.flt,v 1.1 2023/02/22 03:33:43 leavens Exp $ write x; write x; declerrtest2.flt: line 2, column 7: identifier "x" is not declared! # $Id: declerrtest3.flt,v 1.1 2023/02/22 03:33:43 leavens Exp $ bool aBoolVar, another, yet_another; float aFloatVar, anotherOne, yet_another; write aFloatVar; bool aBoolVar; bool another; bool yet_another; float aFloatVar; float anotherOne; float yet_another; write aFloatVar; declerrtest3.flt: line 3, column 30: float "yet_another" is already declared as a bool # $Id: declerrtest4.flt,v 1.1 2023/02/22 03:33:43 leavens Exp $ float x, y; float w, z; bool a, b, c; bool y; w1 = 3.14e2; float x; float y; float w; float z; bool a; bool b; bool c; bool y; w1 = 314.000000; declerrtest4.flt: line 5, column 6: bool "y" is already declared as a float # $Id: declerrtest5.flt,v 1.1 2023/02/22 03:33:43 leavens Exp $ float x, y; float w, z; bool a, b, c; bool y; w1 = 3.14e2; float x; float y; float w; float z; bool a; bool b; bool c; bool y; w1 = 314.000000; declerrtest5.flt: line 5, column 6: bool "y" is already declared as a float # $Id: declerrtest6.flt,v 1.1 2023/02/22 03:33:43 leavens Exp $ float x, y; float w, z; bool a, b, c; { { { { { x = 3.001e2 + 5.654 * 3.5e-32 - y; if (x == x) { y = x * 1.0001 - w - w - (w / w); if (x + 3 != y) { b = !(y <= y * y - x -x/x); write b_y; } } } } } } } float x; float y; float w; float z; bool a; bool b; bool c; { { { { { x = ((300.100006 + (5.654000 * 0.000000)) - y); if ( (x == x) ) { y = ((((x * 1.000100) - w) - w) - (w / w)); if ( ((x + 3.000000) != y) ) { b = (!(y <= (((y * y) - x) - (x / x)))); write b_y; } } } } } } } declerrtest6.flt: line 17, column 21: identifier "b_y" is not declared! # $Id: declerrtest7.flt,v 1.1 2023/02/22 14:03:48 leavens Exp $ float x, y; float w, z; bool a, b, c; { { { { { x = 3.001e2 + 5.654 * 3.5e-32 - y; if (x == x) { y = x * 1.0001 - w - w - (w / w); if (x + 3 != y) { b = !(y <= y * y - x -x/x); b=!b; write r; read x; read y; } } } } } } } float x; float y; float w; float z; bool a; bool b; bool c; { { { { { x = ((300.100006 + (5.654000 * 0.000000)) - y); if ( (x == x) ) { y = ((((x * 1.000100) - w) - w) - (w / w)); if ( ((x + 3.000000) != y) ) { b = (!(y <= (((y * y) - x) - (x / x)))); b = (!b); write r; read x; read y; } } } } } } } declerrtest7.flt: line 18, column 21: identifier "r" is not declared! # $Id: parseerrtest0.flt,v 1.1 2023/02/21 23:16:09 leavens Exp $ float pi; pi = 3.14159; write pi; parseerrtest0.flt: line 4, column 1: syntax error, expecting a eofsym token, but saw a writesym token ("write") # $Id: parseerrtest1.flt,v 1.1 2023/02/21 23:16:09 leavens Exp $ float pi; pi = 3.14159 parseerrtest1.flt: line 4, column 1: syntax error, expecting a semisym token, but saw a eofsym token ("") # $Id: parseerrtest2.flt,v 1.1 2023/02/22 02:28:35 leavens Exp $ bool h; float x, y; bool b; { x = +1.001002003e1; y = -21.0345678e-1; b = (x + 7*3 - 4 - 5.0) < 7.3/3.9 - 4.5e-2; b = !!b; if (!!!!b) if (x < y <= x) if (x == y) if (y != x) write b; } parseerrtest2.flt: line 10, column 24: syntax error, expecting a rparensym token, but saw a leqsym token ("<=") # $Id: parseerrtest3.flt,v 1.1 2023/02/22 14:26:19 leavens Exp $ float pi pi = 3.14159; parseerrtest3.flt: line 3, column 1: syntax error, expecting a semisym token, but saw a identsym token ("pi") # $Id: parseerrtest4.flt,v 1.1 2023/02/22 14:26:19 leavens Exp $ float pi; float f; # syntax error below, condition of an if needs parentheses! if f < pi { write f; write pi; } parseerrtest4.flt: line 5, column 4: syntax error, expecting a lparensym token, but saw a identsym token ("f") # $Id: parseerrtest5.flt,v 1.1 2023/02/22 14:26:19 leavens Exp $ float pi; float f; { if (!(pi <= f)) { # syntax error below, condition of an if needs parentheses! if f < pi { write f; write pi; } } } parseerrtest5.flt: line 7, column 6: syntax error, expecting a lparensym token, but saw a identsym token ("f") # $Id: parseerrtest6.flt,v 1.1 2023/02/22 14:26:19 leavens Exp $ bool h; float pi; float g; { { read g; read pi; # missing semicolon write g < pi } } parseerrtest6.flt: line 11, column 2: syntax error, expecting a semisym token, but saw a rcurlysym token ("}") # $Id: parseerrtest7.flt,v 1.1 2023/02/22 14:26:19 leavens Exp $ bool h; float pi; float g; { { read g; read pi; write g < pi; #missing right curly bracket } parseerrtest7.flt: line 13, column 1: syntax error, expecting a rcurlysym token, but saw a eofsym token ("")