home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
users
/
Harry
/
compilers
/
p2
/
tst
/
testLimits.pcat
< prev
Wrap
Text File
|
2005-10-11
|
3KB
|
50 lines
(* This file should not cause any errors. *)
(* Test the keywords *)
and array begin by div do else elseif end exit
for if is loop mod not of or procedure
program read record return then to type var while write
(* Make sure that upper case keywords are recognized as identifiers *)
AND ARRAY BEGIN BY DIV DO ELSE ELSEIF END EXIT
FOR IF IS LOOP MOD NOT OF OR PROCEDURE
PROGRAM READ RECORD RETURN THEN TO TYPE VAR WHILE WRITE
(* Test all the single and double character operators and delimiters *)
:= + - * / < <= > >= = <> : ; , . ( ) [ ] { }
(* Here is
a multi-line
comment. *)
(* Here is a long but legal ID *)
longIdentifer45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
(* Test that equal strings are handled correctly *)
abc
"abc"
abc
"abc"
(* The following string has all the printable ASCII characters *)
" !#$%&'()*+,-./0123456789:;<=>?@ABC...XYZ[\]^_`abc...xyz{|}~"
(* This comment has a variety of characters
!"#$%&'()*+,-./0123456789:;<=>?@ABC...XYZ[\]^_`abc...xyz{|}~ *)
(* This comments has tab and \007 *)
(* Here is a large but legal integer *) 2147483647
(* Here is a large real number *)
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234.678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
(* Here is a long but legal string *)
"longString12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
(* Test tightly packed tokens... *)
a:b:=c+d++e::f<g<<h<==i>j>>k>>=l<>>m<<>n,o,p[q[<r[[<<s>]t>>]u>>]]v>>}w
a/b//c///d*e**e***f...,,,;;;(())[[]]{{}}[<>]:=:=:g=:=h
do:do:=do+do++do::do<do<<do<==do>do>>do>>=do<>>do<<>do,do,do[do[<do[[<<do>]do
do>>]do>>]]do>>}do