From 5c713d8f027a9b6be687ee3f7e917e8bd2115773 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 27 Jun 2008 09:18:50 +0000 Subject: took away old-examples --- old-examples/tutorial/calculator/CalculatorJ.gf | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 old-examples/tutorial/calculator/CalculatorJ.gf (limited to 'old-examples/tutorial/calculator/CalculatorJ.gf') diff --git a/old-examples/tutorial/calculator/CalculatorJ.gf b/old-examples/tutorial/calculator/CalculatorJ.gf deleted file mode 100644 index 68ff5342c..000000000 --- a/old-examples/tutorial/calculator/CalculatorJ.gf +++ /dev/null @@ -1,25 +0,0 @@ ---# -path=.:prelude - -concrete CalculatorJ of Calculator = open Prelude in { - - flags lexer=codevars ; unlexer=code ; - - lincat - Prog, Exp, Var = SS ; - - lin - PEmpty = ss [] ; - PInit exp prog = ss (exp.s ++ ";" ++ "istore" ++ prog.$0 ++ ";" ++ prog.s) ; - PAss vr exp prog = ss (exp.s ++ ";" ++ "istore" ++ vr.s ++ ";" ++ prog.s) ; - - EPlus = postfix "iadd" ; - EMinus = postfix "isub" ; - ETimes = postfix "imul" ; - EDiv = postfix "idiv" ; - - EInt = prefixSS "iconst" ; - EVar = prefixSS "iload" ; - - oper - postfix : Str -> SS -> SS -> SS = \op,x,y -> ss (x.s ++ ";" ++ y.s ++ ";" ++ op) ; -} -- cgit v1.2.3