Permalink
Browse files

added some blurb

  • Loading branch information...
1 parent a09c47c commit 531bc98aad8ec3ef1b0d7555067c73e5a2c3672e @aabs committed Feb 27, 2012
Showing with 53 additions and 0 deletions.
  1. +53 −0 README
View
53 README
@@ -0,0 +1,53 @@
+This is very definitely pre-alpha code. An experiment in creating a concatenative language.
+Feel free to join in, its been fun so far and there's still lots to do. I'm using COCO/R
+for the parsing bits, and have a simple little stack with an instruction pipeline.
+
+
+The runtime stack based language is defined independently of the syntax of the language, and to a certain extent the semantics also. This document defines the operations that are defined on the VM. They define how the VM operations affect the stack and the symtab.
+
+String
+[] => [string]
+
+OpNoOp
+[] => []
+
+OpIntAdd
+[int, int] => [int]
+
+OpIntMul
+[int, int] => [int]
+
+XmlStartElement
+[] => [XmlBuilder]
+
+XmlIdent
+[XmlBuilder, string] => [XmlBuilder]
+[XmlCloser, string] => [XmlCloser]
+
+XmlAttrName
+[string] => [AttrBuilder]
+
+XmlAttrVal
+[XmlBuilder, AttrBuilder, string] => [XmlBuilder]
+
+XmlText
+[XmlBuilder, string] ==> [XmlBuilder] // add a #text to the XmlBuilder
+
+XmlUniEnd
+insert it into enclosing element if there is one
+[XmlBuilder, XmlBuilder] => [XmlBuilder]
+
+otherwise construct a finished XmlElement on the stack
+[XmlBuilder] => [XmlElement]
+
+XmlStartEndTag
+[XmlBuilder] => [XmlCloser]
+
+XmlEndBrace
+[XmlBuilder] ==> [XmlBuilder]
+
+insert a finished XmlElement into the enclosing element builder
+[XmlBuilder, XmlCloser] ==> [XElement]
+
+otherwise create the finished XmlElement
+[XmlCloser] ==> [XElement]

0 comments on commit 531bc98

Please sign in to comment.