From d39cf84965dffd11cab440f5a4efa1b16932ba73 Mon Sep 17 00:00:00 2001 From: Lizzy Hunt Date: Wed, 28 Feb 2024 13:41:53 -0700 Subject: branching --- test/programs/branching.cps | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/programs/branching.cps (limited to 'test/programs/branching.cps') diff --git a/test/programs/branching.cps b/test/programs/branching.cps new file mode 100644 index 0000000..f73704c --- /dev/null +++ b/test/programs/branching.cps @@ -0,0 +1,10 @@ +PRIMOP(>=, [REAL 0, REAL 1], [resultFalse], [ + PRIMOP(+, [REAL 2, REAL 4], [result], []), + PRIMOP(<=, [INT 1, REAL 1], [resultTrue], [ + PRIMOP(&&, [VAR resultTrue, VAR resultFalse], [fin], [ + PRIMOP(-, [REAL 1, REAL 1], [result], []), + PRIMOP(+, [REAL 1, REAL 1], [twoWhenFinIsFalse], []) + ]), + PRIMOP(-, [REAL 1, REAL 1], [result], []) + ]) +]) \ No newline at end of file -- cgit v1.2.3-70-g09d2