From 76ba03b545600054176612201de78dca16eb65e1 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 22 Nov 2010 12:55:37 +0000 Subject: started a subdir for the book --- book/examples/chapter8/CalculatorC.gf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 book/examples/chapter8/CalculatorC.gf (limited to 'book/examples/chapter8/CalculatorC.gf') diff --git a/book/examples/chapter8/CalculatorC.gf b/book/examples/chapter8/CalculatorC.gf new file mode 100644 index 000000000..99db80530 --- /dev/null +++ b/book/examples/chapter8/CalculatorC.gf @@ -0,0 +1,10 @@ +concrete CalculatorC of Calculator = open Formal, Prelude in { +lincat + Exp = TermPrec ; +lin + EPlus = infixl 0 "+" ; + EMinus = infixl 0 "-" ; + ETimes = infixl 1 "*" ; + EDiv = infixl 1 "/" ; + EInt i = constant i.s ; +} -- cgit v1.2.3