/* This is an initial test file for Carnap. It is a set of constructs designed to test the syntax only. Steven. March 2007 */ ** comment line class c extends base_class'with_very_long_name public let a = 6 private function f(x) = x * 6 : use c as class_example use apache as display use filesystem as fs use postgresql as db function f ( x ) = e where p( e ) function f ( x ) = e where let a = 6 : p( e ) procedure p ( n , m ) { let a = 6 let b := _ -> int : {c := f(x) * 5 ** a procedure body } } let constant = "foo bar" ** comment line let v := _ -> int : {on stop p( ) : /* multi-line comment */ p ( ) q ( ) unfold p ( ) || replicate i for n: p ( i ) . || i for n : p ( i ) . || p ( ) q ( ) r ( ) ** sequence { let v := _ -> int: v := ( if v > 2 : ++v else --v ) } ** action let v := _ -> int: v := ( if v > 2 : ++v else --v ) . // p ( x, y, z ) . test replicate i for n : a[i][j][k] = i : g ( ) . while b : p( ) do p( ) until b do q( ) until b' and c = 'c' do z( ) until b'''hdh'l'kjffh_ test b : p ( h ) b and b : q ( g ) else ++ v . v := f(x) * w - 6 a[i][j] := f(x) * w - 5 + class_example.a skip stop ** comment }