From 6ded4ba69cf3b1caea17990be4096844e20b1495 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 26 Mar 2007 21:02:30 +0000 Subject: [PATCH] toy target language --- devel/compiler/Src.cf | 1 + devel/compiler/Tgt.cf | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 devel/compiler/Tgt.cf diff --git a/devel/compiler/Src.cf b/devel/compiler/Src.cf index 5901ff8ed..57f1f146c 100644 --- a/devel/compiler/Src.cf +++ b/devel/compiler/Src.cf @@ -62,3 +62,4 @@ separator AssPatt ";" ; comment "--" ; comment "{-" "-}" ; + diff --git a/devel/compiler/Tgt.cf b/devel/compiler/Tgt.cf new file mode 100644 index 000000000..a61c0bf74 --- /dev/null +++ b/devel/compiler/Tgt.cf @@ -0,0 +1,16 @@ +--- target language + +Tg. Object ::= [Fun] ; + +FVal. Fun ::= Ident "=" Val ; + +terminator Fun ";" ; + +VRec. Val ::= "[" [Val] "]" ; +VPro. Val ::= "(" Val "." Val ")" ; +VTok. Val ::= String ; +VArg. Val ::= "$" Integer ; +VPar. Val ::= Integer ; +VCat. Val ::= "(" Val Val ")" ; + +terminator Val "," ;