<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4416762298289541834</id><updated>2012-02-16T01:00:27.276-08:00</updated><title type='text'>Pyramism</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.pyramism.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-636586143038274851</id><published>2008-07-30T22:19:00.001-07:00</published><updated>2008-07-31T19:36:43.114-07:00</updated><title type='text'>model driven web app demo</title><content type='html'>In this demo I show how you might use Gem to create a model driven web application.  I think it would be interesting to investigate pairing this with &lt;a href="http://www.jroller.com/aav/entry/osgi_running_on_amazon_ec2"&gt;OSGi running on Amazon EC2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="545" width="718"&gt; &lt;param name="movie" value="http://content.screencast.com/users/cjdaly/folders/Default/media/bbfcc09f-d590-4da4-8f34-06612a6b3444/bootstrap.swf"&gt; &lt;param name="quality" value="high"&gt; &lt;param name="bgcolor" value="#FFFFFF"&gt; &lt;param name="flashVars" value="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/bbfcc09f-d590-4da4-8f34-06612a6b3444/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/bbfcc09f-d590-4da4-8f34-06612a6b3444/gem-site-demo.swf&amp;amp;width=718&amp;amp;height=545"&gt; &lt;param name="allowFullScreen" value="true"&gt; &lt;param name="scale" value="showall"&gt; &lt;param name="allowScriptAccess" value="always"&gt;  &lt;embed src="http://content.screencast.com/users/cjdaly/folders/Default/media/bbfcc09f-d590-4da4-8f34-06612a6b3444/bootstrap.swf" quality="high" bgcolor="#FFFFFF" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/bbfcc09f-d590-4da4-8f34-06612a6b3444/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/bbfcc09f-d590-4da4-8f34-06612a6b3444/gem-site-demo.swf&amp;amp;width=718&amp;amp;height=545" allowfullscreen="true" scale="showall" height="545" width="718"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;&lt;br /&gt;I first described how the UriLayer/SegmentLayer worked &lt;a href="http://blog.pyramism.net/2008/01/segmentlayer-and-urilayer.html"&gt;back in January&lt;/a&gt;.  Since then the details have changed a bit.  The  key points are described below:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;URI segment names can be established by using a word prefixed with ~ at the beginning of a group.  So [~foo a b c] causes the segment name of the group to be foo.  The change from January is that it was foo~  (suffix instead of prefix) back then.  Arguably, /foo or foo/ would be a clearer way of indicating segment name.&lt;/li&gt;&lt;li&gt;In the demo I forgot to talk about the '!' character.  This is used to indicate the point at which you move from the filesystem into the model (in EMF terms, it's perhaps like going from the EResource to one of the logical elements - like an EPackage -  inside the resource).&lt;/li&gt;&lt;li&gt;To continue with the last point&lt;/li&gt;&lt;ul&gt;&lt;li&gt;/demo/site.gem  identifies a model file (or just some arbitrary file).&lt;/li&gt;&lt;li&gt;/demo/site.gem!  identifies the Model element (the root node in the model).&lt;/li&gt;&lt;li&gt;/demo/site.gem!/ identifies the Figure inside the Model.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;/demo/site.gem!/foo identifies a Site with segment name 'foo' inside the root Figure.&lt;/li&gt;&lt;li&gt;/demo/site.gem!/foo/ identifies the Figure inside the above Site.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;So note from above that the trailing / always indicates a Figure (whereas in January it always indicate a Site).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-636586143038274851?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/636586143038274851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=636586143038274851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/636586143038274851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/636586143038274851'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/07/model-driven-web-app-demo.html' title='model driven web app demo'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-5829620949060245795</id><published>2008-07-28T22:19:00.001-07:00</published><updated>2008-07-28T22:22:18.480-07:00</updated><title type='text'>Using Gem as a simple presentation engine</title><content type='html'>This demo shows how Gem can be used to create simple presentations.&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="650" width="751"&gt; &lt;param name="movie" value="http://content.screencast.com/users/cjdaly/folders/Default/media/c4201045-2964-42fd-b11b-da7a9ea8845d/bootstrap.swf"&gt; &lt;param name="quality" value="high"&gt; &lt;param name="bgcolor" value="#FFFFFF"&gt; &lt;param name="flashVars" value="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/c4201045-2964-42fd-b11b-da7a9ea8845d/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/c4201045-2964-42fd-b11b-da7a9ea8845d/gem-movie-demo.swf&amp;amp;width=751&amp;amp;height=650"&gt; &lt;param name="allowFullScreen" value="true"&gt; &lt;param name="scale" value="showall"&gt; &lt;param name="allowScriptAccess" value="always"&gt;  &lt;embed src="http://content.screencast.com/users/cjdaly/folders/Default/media/c4201045-2964-42fd-b11b-da7a9ea8845d/bootstrap.swf" quality="high" bgcolor="#FFFFFF" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/c4201045-2964-42fd-b11b-da7a9ea8845d/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/c4201045-2964-42fd-b11b-da7a9ea8845d/gem-movie-demo.swf&amp;amp;width=751&amp;amp;height=650" allowfullscreen="true" scale="showall" height="650" width="751"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-5829620949060245795?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/5829620949060245795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=5829620949060245795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/5829620949060245795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/5829620949060245795'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/07/using-gem-as-simple-presentation-engine.html' title='Using Gem as a simple presentation engine'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-7470175185858570221</id><published>2008-07-28T21:10:00.000-07:00</published><updated>2008-07-28T21:15:24.703-07:00</updated><title type='text'>Walkthrough of implementing a Gem layer</title><content type='html'>Demo part 1:&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="568" width="716"&gt; &lt;param name="movie" value="http://content.screencast.com/users/cjdaly/folders/Default/media/dfa13659-e49f-48de-955f-4af08031e6ae/bootstrap.swf"&gt; &lt;param name="quality" value="high"&gt; &lt;param name="bgcolor" value="#FFFFFF"&gt; &lt;param name="flashVars" value="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/dfa13659-e49f-48de-955f-4af08031e6ae/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/dfa13659-e49f-48de-955f-4af08031e6ae/gem-layer-extension-demo-part1.swf&amp;amp;width=716&amp;amp;height=568"&gt; &lt;param name="allowFullScreen" value="true"&gt; &lt;param name="scale" value="showall"&gt; &lt;param name="allowScriptAccess" value="always"&gt;  &lt;embed src="http://content.screencast.com/users/cjdaly/folders/Default/media/dfa13659-e49f-48de-955f-4af08031e6ae/bootstrap.swf" quality="high" bgcolor="#FFFFFF" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/dfa13659-e49f-48de-955f-4af08031e6ae/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/dfa13659-e49f-48de-955f-4af08031e6ae/gem-layer-extension-demo-part1.swf&amp;amp;width=716&amp;amp;height=568" allowfullscreen="true" scale="showall" height="568" width="716"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Demo part 2:&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="570" width="716"&gt; &lt;param name="movie" value="http://content.screencast.com/users/cjdaly/folders/Default/media/3c5f120d-45f9-4abc-9723-9b6e76cf1d92/bootstrap.swf"&gt; &lt;param name="quality" value="high"&gt; &lt;param name="bgcolor" value="#FFFFFF"&gt; &lt;param name="flashVars" value="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/3c5f120d-45f9-4abc-9723-9b6e76cf1d92/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/3c5f120d-45f9-4abc-9723-9b6e76cf1d92/gem-layer-extension-demo-part2.swf&amp;amp;width=716&amp;amp;height=570"&gt; &lt;param name="allowFullScreen" value="true"&gt; &lt;param name="scale" value="showall"&gt; &lt;param name="allowScriptAccess" value="always"&gt;  &lt;embed src="http://content.screencast.com/users/cjdaly/folders/Default/media/3c5f120d-45f9-4abc-9723-9b6e76cf1d92/bootstrap.swf" quality="high" bgcolor="#FFFFFF" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/3c5f120d-45f9-4abc-9723-9b6e76cf1d92/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/3c5f120d-45f9-4abc-9723-9b6e76cf1d92/gem-layer-extension-demo-part2.swf&amp;amp;width=716&amp;amp;height=570" allowfullscreen="true" scale="showall" height="570" width="716"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-7470175185858570221?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/7470175185858570221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=7470175185858570221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/7470175185858570221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/7470175185858570221'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/07/walkthrough-of-implementing-gem-layer.html' title='Walkthrough of implementing a Gem layer'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-821497384772551619</id><published>2008-07-27T22:31:00.000-07:00</published><updated>2008-07-28T23:11:13.610-07:00</updated><title type='text'>Demo of new visual layers</title><content type='html'>Since the first series of posts in January I've been slowly working on a new set of layers that comprise a simple visual editor for Gem models.  Here is a first look at the new stuff:&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="511" width="676"&gt; &lt;param name="movie" value="http://content.screencast.com/users/cjdaly/folders/Default/media/162989c6-c0d4-42c3-bbee-a10ce6ed974d/bootstrap.swf"&gt; &lt;param name="quality" value="high"&gt; &lt;param name="bgcolor" value="#FFFFFF"&gt; &lt;param name="flashVars" value="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/162989c6-c0d4-42c3-bbee-a10ce6ed974d/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/162989c6-c0d4-42c3-bbee-a10ce6ed974d/gem-hello-demo.swf&amp;amp;width=676&amp;amp;height=511"&gt; &lt;param name="allowFullScreen" value="true"&gt; &lt;param name="scale" value="showall"&gt; &lt;param name="allowScriptAccess" value="always"&gt;  &lt;embed src="http://content.screencast.com/users/cjdaly/folders/Default/media/162989c6-c0d4-42c3-bbee-a10ce6ed974d/bootstrap.swf" quality="high" bgcolor="#FFFFFF" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="thumb=http://content.screencast.com/users/cjdaly/folders/Default/media/162989c6-c0d4-42c3-bbee-a10ce6ed974d/FirstFrame.jpg&amp;amp;content=http://content.screencast.com/users/cjdaly/folders/Default/media/162989c6-c0d4-42c3-bbee-a10ce6ed974d/gem-hello-demo.swf&amp;amp;width=676&amp;amp;height=511" allowfullscreen="true" scale="showall" height="511" width="676"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;I talk about several layers in the demo.  Here is a quick summary of them:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;FrameLayer - Manages size and position information of visual elements.  Supports mapping raw coordinates to the "most appropriate" (deepest) element.&lt;/li&gt;&lt;li&gt;ShapeLayer - Performs layout and drawing of the view.  Can be extended to support a variety of layout and draw methods.&lt;/li&gt;&lt;li&gt;SelectionLayer - Keeps track of the currently selected element. (Forgot to mention this in the demo.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;MouseEventLayer - Handles raw mouse events received by the SWT canvas and forwards them to the most appropriate ShapeFacet for handling.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;KeyEventLayer - Handles raw key events and directs them using the current SelectionFacet.&lt;/li&gt;&lt;li&gt;GraphvizLayers - Render sections of the model as "interesting" graphs using graphviz.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-821497384772551619?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/821497384772551619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=821497384772551619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/821497384772551619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/821497384772551619'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/07/screencast-demo-of.html' title='Demo of new visual layers'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-3962267599101632363</id><published>2008-01-18T21:27:00.000-08:00</published><updated>2008-01-20T13:46:13.042-08:00</updated><title type='text'>The SegmentLayer and UriLayer</title><content type='html'>Another layer idea I've been playing with is the UriLayer.  The basic idea here is to give every Faceted part in the model a hierarchical path-based URI.  This will allow for another way of modeling relationships (by embedding URIs in models, similar to how we did it with "spans" in the &lt;a href="http://blog.pyramism.net/2008/01/spanlayer.html"&gt;SpanLayer&lt;/a&gt;)  and can serve as a basis for inter-model references (or external references to model parts).&lt;br /&gt;&lt;br /&gt;Here again I'll assign bits of the Gem syntax to assist.  If the first child in a Group or Root element is a Word that has a ~ suffix, then it will be treated as the segment of the URI path for the Group or Root element, otherwise the segment will just be the index number of the Faceted part.... Ok that sounds a bit complicated, so here's the text for a model:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;foo~ (barX~ a b [baz~] ) (barY~ b)&lt;/blockquote&gt;and here's a look at the model:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/__TM2Gbu9_xc/R5GQc_Yk6-I/AAAAAAAAABc/rB8Ipvwh4EY/s1600-h/SegmentLayer.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/__TM2Gbu9_xc/R5GQc_Yk6-I/AAAAAAAAABc/rB8Ipvwh4EY/s400/SegmentLayer.png" alt="" id="BLOGGER_PHOTO_ID_5157061876041182178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So the idea is that foo~, barX~, etc. are Words with the ~ suffix and appear first in their Group, therefore they have been used to name the SegmentFacet of their Group.  The SegmentFacets that don't get a name this way simply get a number instead.&lt;br /&gt;&lt;br /&gt;The UriLayer itself simply gives us a view of the URI assigned to every Faceted part by walking up to the Model part and concatenating each SegmentFacet value on the way:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/__TM2Gbu9_xc/R5GTG_Yk6_I/AAAAAAAAABk/y7s1FFcOlvU/s1600-h/UriLayer.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/__TM2Gbu9_xc/R5GTG_Yk6_I/AAAAAAAAABk/y7s1FFcOlvU/s400/UriLayer.png" alt="" id="BLOGGER_PHOTO_ID_5157064796618943474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The images above are showing Figures but not Sites.  Let's look at both for the SegmentLayer:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/__TM2Gbu9_xc/R5O8-fYk7AI/AAAAAAAAABs/NjslfCB9dik/s1600-h/SegmentLayer-WithSites.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/__TM2Gbu9_xc/R5O8-fYk7AI/AAAAAAAAABs/NjslfCB9dik/s400/SegmentLayer-WithSites.png" alt="" id="BLOGGER_PHOTO_ID_5157673780031843330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So all Sites have '/' as the SegmentFacet value except for the Model which has '!'.  The idea here is that if the Environment is asked to resolve a URI it can split it around the '!' and look at the first part to find a model and then hand the second part to the model's UriLayer to resolve in the context of that model.&lt;br /&gt;&lt;br /&gt;The vague plan...&lt;br /&gt;&lt;br /&gt;I've thought about adding an abstract UriQueryLayer where its UriQueryFacet would have a method like handle(String uriQuery).  This would allow for resolving a URI (with the UriLayer) and handing the parameters to the resolved part to do .... whatever (you would subclass UriQueryFacet to provide domain-specific implementations).&lt;br /&gt;&lt;br /&gt;With this group of layers you could imagine using a model to power a servlet.  Incoming URLs could be directed to a UriQueryFacet for processing.  The behavior of this servlet can vary based on the structure of the model (used to encode state) and the implementation of the UriQueryFacet (used to encode behavior).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-3962267599101632363?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/3962267599101632363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=3962267599101632363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/3962267599101632363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/3962267599101632363'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/segmentlayer-and-urilayer.html' title='The SegmentLayer and UriLayer'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/__TM2Gbu9_xc/R5GQc_Yk6-I/AAAAAAAAABc/rB8Ipvwh4EY/s72-c/SegmentLayer.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-4702945370307764354</id><published>2008-01-16T20:45:00.000-08:00</published><updated>2008-01-16T21:22:09.289-08:00</updated><title type='text'>blog filter: Epsilon and Glimmer</title><content type='html'>Here are two blog posts pulled from &lt;a href="http://planeteclipse.org"&gt;Planet Eclipse&lt;/a&gt; this week that relate somewhat to my quest for modeling language nirvana (whatever that means).&lt;br /&gt;&lt;br /&gt;First is about a very cool looking Eclipse GMT subproject called &lt;a href="http://www.eclipse.org/gmt/epsilon/"&gt;Epsilon&lt;/a&gt;.  The post is about how Epsilon can &lt;a href="http://epsilonblog.wordpress.com/2008/01/16/using-hutn-for-t2m-transformation/"&gt;transform from HUTN to EMF&lt;/a&gt; (HUTN is a &lt;a href="http://www.omg.org/technology/documents/formal/hutn.htm"&gt;spec&lt;/a&gt; that outlines a general purpose textual syntax for describing models).  See the linked screencast demo.  Also mentioned are &lt;a href="http://www.eclipse.org/gmt/oaw/doc/4.2/html/contents/xtext_reference.html"&gt;xText&lt;/a&gt; and &lt;a href="http://www.eclipse.org/gmt/tcs/"&gt;TCS&lt;/a&gt; - two textual modeling / DSL systems in the Eclipse modeling project orbit.&lt;br /&gt;&lt;br /&gt;The second post is about &lt;a href="http://andymaleh.blogspot.com/2008/01/xml-is-dead-welcome-glimmerized-xml.html"&gt;Glimmer&lt;/a&gt;. (And it makes the bold, but somewhat dubious claim that 'XML is dead'.  Don't we wish!).  Glimmer looks like a simple declarative syntax for &lt;a href="http://www.eclipse.org/swt/"&gt;SWT&lt;/a&gt; screen layout.  I thought this was cool because I've been generating graphviz's &lt;a href="http://graphviz.org/doc/info/lang.html"&gt;DOT&lt;/a&gt; syntax from Gem and it would be similarly easy to generate Glimmer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-4702945370307764354?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/4702945370307764354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=4702945370307764354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/4702945370307764354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/4702945370307764354'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/blog-filter-epsilon-and-glimmer.html' title='blog filter: Epsilon and Glimmer'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-9079209547109413257</id><published>2008-01-13T22:28:00.000-08:00</published><updated>2008-01-13T23:35:13.421-08:00</updated><title type='text'>The SpanLayer</title><content type='html'>In this post I'm going to continue two threads from previous posts.&lt;br /&gt;&lt;br /&gt;First, I mentioned previously that I think of modeling as object-orientation with first-class relationships between the objects and I talked about the containment relationship which is built into the lattice metamodel.  In this post I want to talk about implementing another kind of relationship as a layer called the SpanLayer.&lt;br /&gt;&lt;br /&gt;Second, I've described the Gem syntax and noted that it has no pre-assigned semantics.  Here I'm going to reach into this toolbox of syntax and begin assigning meaning to it.&lt;br /&gt;&lt;br /&gt;The idea of the SpanLayer is to build a hashtable that maps some of the facets to others.  We will interpret the ` (back-tick) prefixing a Word as designating the target (or end-point) of a "span" and the ~ (tilde) prefixing a Word as designating the source (or start-point) of a span.&lt;br /&gt;&lt;br /&gt;Let's look at an example:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/__TM2Gbu9_xc/R4sIQPYk68I/AAAAAAAAABM/u2mdYp8ymCI/s1600-h/SpanLayer.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/__TM2Gbu9_xc/R4sIQPYk68I/AAAAAAAAABM/u2mdYp8ymCI/s400/SpanLayer.png" alt="" id="BLOGGER_PHOTO_ID_5155223273556208578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The text for the above model looks like this:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;`foo `bar [ a b ~foo (c ~bar ~foo) ]&lt;/blockquote&gt;The SpanLayer shown in the diagram is simply highlighting the sources and targets of the spans by blanking out the text for the facets that aren't related to spanning.  This is ok for a start, but it would be better to show spans more like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/__TM2Gbu9_xc/R4sKFvYk69I/AAAAAAAAABU/bSssnsvoTT0/s1600-h/FancySpanLayer.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/__TM2Gbu9_xc/R4sKFvYk69I/AAAAAAAAABU/bSssnsvoTT0/s400/FancySpanLayer.png" alt="" id="BLOGGER_PHOTO_ID_5155225292190837714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here the span targets are shown with a different shape and the spans themselves are drawn from source to target.  This FancySpanLayer was built on top of the SpanLayer.  It uses the raw span information provided by the SpanLayer and renders it in a more sensible way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-9079209547109413257?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/9079209547109413257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=9079209547109413257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/9079209547109413257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/9079209547109413257'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/spanlayer.html' title='The SpanLayer'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/__TM2Gbu9_xc/R4sIQPYk68I/AAAAAAAAABM/u2mdYp8ymCI/s72-c/SpanLayer.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-5659117017317859560</id><published>2008-01-12T21:08:00.000-08:00</published><updated>2008-07-31T20:04:18.656-07:00</updated><title type='text'>Overview</title><content type='html'>The purpose of this blog is to document an experimental software modeling system I've been developing as a hobby project. The name of this system is Gem, which is an acronym for Graphical Executable Modeling.&lt;br /&gt;&lt;br /&gt;This post serves as an outline and suggested reading order for the blog.&lt;br /&gt;&lt;br /&gt;Gem and this blog are works in progress.  I will continue to revise existing posts, add new posts and develop the code base as time permits.  Feedback is greatly appreciated.  You can send mail to cjdaly at the domain-name of this blog.&lt;br /&gt;&lt;br /&gt;Introduction&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/01/rants-and-raves.html"&gt;Rants and Raves&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/01/related-material.html"&gt;Related material&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Sketch of a language workbench?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/01/gem-proto-language-syntax.html"&gt;The Gem syntax&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/01/lattice-metamodel.html"&gt;The Lattice Metamodel&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/01/serializelayer-and-parselayer.html"&gt;The ParseLayer and SerializeLayer&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Simple non-containment references&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/01/spanlayer.html"&gt;SpanLayer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/01/segmentlayer-and-urilayer.html"&gt;The SegmentLayer and UriLayer&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Demos!&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/07/screencast-demo-of.html"&gt;Visual Layers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/07/walkthrough-of-implementing-gem-layer.html"&gt;Implementing a new Layer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/07/using-gem-as-simple-presentation-engine.html"&gt;Gem as a presentation engine&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.pyramism.net/2008/07/model-driven-web-app-demo.html"&gt;Model-driven web application&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;more to come...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-5659117017317859560?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/5659117017317859560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=5659117017317859560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/5659117017317859560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/5659117017317859560'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/overview.html' title='Overview'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-3997832233015113454</id><published>2008-01-10T21:02:00.000-08:00</published><updated>2008-01-13T23:33:36.661-08:00</updated><title type='text'>The SerializeLayer and the ParseLayer</title><content type='html'>Let's look at a "Hello World" model and use it to talk about the two most important layers in Gem.  The input text of the model below is simply:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;Hello World!&lt;/blockquote&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/__TM2Gbu9_xc/R4b5SfYk66I/AAAAAAAAAA8/Fxi6mCZ5pD0/s1600-h/HelloWorld.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/__TM2Gbu9_xc/R4b5SfYk66I/AAAAAAAAAA8/Fxi6mCZ5pD0/s400/HelloWorld.png" alt="" id="BLOGGER_PHOTO_ID_5154080919629654946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The SerializeLayer has a buffer of the text of the model and each SerializeFacet maps between positions in the buffer and their associated parse nodes.  The ParseLayer represents the tree produced from parsing.  As you can see from the graph on the right, each ParseFacet knows what kind of node (Word, Operator, Root, etc...) was parsed at the position recorded in the associated SerializeFacet.&lt;br /&gt;&lt;br /&gt;The SerializeLayer and ParseLayer have a somewhat incestuous relationship (there is a circular dependency between them) and they could be collapsed into one.  For now I am keeping them separate because I think it's a little simpler to deal with and it makes for more interesting pictures.&lt;br /&gt;&lt;br /&gt;Speaking of interesting pictures, here is a more elaborate model:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/__TM2Gbu9_xc/R4cKcfYk67I/AAAAAAAAABE/I0dLpYRGTp0/s1600-h/FooGem.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/__TM2Gbu9_xc/R4cKcfYk67I/AAAAAAAAABE/I0dLpYRGTp0/s400/FooGem.png" alt="" id="BLOGGER_PHOTO_ID_5154099783126018994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The input text of the above model is:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;foo (bar {baz} 'abc ~{123}' xyz )&lt;/blockquote&gt;The difference between Figures and Sites isn't relevant for the SerializeLayer and ParseLayer so notice that the Sites have been omitted here to simplify the graphs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-3997832233015113454?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/3997832233015113454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=3997832233015113454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/3997832233015113454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/3997832233015113454'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/serializelayer-and-parselayer.html' title='The SerializeLayer and the ParseLayer'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/__TM2Gbu9_xc/R4b5SfYk66I/AAAAAAAAAA8/Fxi6mCZ5pD0/s72-c/HelloWorld.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-9077829768260726079</id><published>2008-01-07T21:51:00.001-08:00</published><updated>2008-01-13T23:32:24.747-08:00</updated><title type='text'>The Lattice Metamodel</title><content type='html'>In the course of working on Gem I have identified and developed something I'm calling the Lattice Metamodel.  The simplest way to think of it is as an array of trees where every tree has the same shape.  I had started with a simple parse tree (as I often do) and was trying to pull semantic information out of the tree in small increments.  Over time I could see several trees with data flowing from one to another.  After more time I started to think of this as a lattice with many layers where you can navigate both the tree structure of an individual layer and between layers.&lt;br /&gt;&lt;br /&gt;I think it's interesting to compare this idea with &lt;a href="http://en.wikipedia.org/wiki/Attribute_grammar"&gt;attribute grammars&lt;/a&gt; where information flows up and down in a single tree.  There is also a similarity with &lt;a href="http://en.wikipedia.org/wiki/Neural_networks"&gt;neural networks&lt;/a&gt; where groups of neurons are often organized into layers.  I'm not much of a theoretician.  I'm more of a practitioner who fiddles around with stuff like this in the hopes that it will make code smaller, simpler and more readable.  So for me the key challenge was to think of the lattice as a programming model and make it easy to write code that operates on (and in) the lattice.&lt;br /&gt;&lt;br /&gt;Below is a screenshot of the class hierarchy of the lattice metamodel.  In case you can't tell, these are Java classes viewed in &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/__TM2Gbu9_xc/R4MQy_Yk62I/AAAAAAAAAAc/4nB57W4JKHY/s1600-h/PartHierarchy.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/__TM2Gbu9_xc/R4MQy_Yk62I/AAAAAAAAAAc/4nB57W4JKHY/s320/PartHierarchy.png" alt="" id="BLOGGER_PHOTO_ID_5152980866835999586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Everything is a Part (just as in UML everything is an "Element").  The primary tree of the lattice (that defines the tree shape for all the layers) is rooted at a Model part.  The rest of this tree is composed of Figures and Sites.  Each Figure may contain zero or more Sites and each Site contains zero or one Figure.  Note that a Model is a kind of Site.&lt;br /&gt;&lt;br /&gt;Models have a collection of Layers.  Figures and Sites are "Faceted" which means they each have a collection of Facets.  Each Facet is an intersection between a Layer and a Faceted part.  The diagram below shows an example model with two layers.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/__TM2Gbu9_xc/R4MQ4_Yk63I/AAAAAAAAAAk/S1wRLMpMvvU/s1600-h/LatticeMetaModel.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/__TM2Gbu9_xc/R4MQ4_Yk63I/AAAAAAAAAAk/S1wRLMpMvvU/s400/LatticeMetaModel.png" alt="" id="BLOGGER_PHOTO_ID_5152980969915214706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(The black vertical and diagonal lines show the containment relationships.  The blue horizontal lines are simply showing the "sibling" relationship created when two parts have the same parent.)&lt;br /&gt;&lt;br /&gt;Imagine overlaying the three trees on top of each other and having a series of vertical connections that tie each Faceted part to the two Facets above it.&lt;br /&gt;&lt;br /&gt;The only class not yet mentioned is Environment which is essentially just a collection of Models.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Extending the Lattice&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Each of the Part classes has an associated Extension class, but I'm just going to discuss LayerExtension and FacetExtension here.  The role of the Part classes is simply to describe the structure of the lattice.  The Extension classes are for introducing interesting behavior into this structure.&lt;br /&gt;&lt;br /&gt;If you want to implement a new Layer you subclass LayerExtension and register it with an Eclipse extension-point.  There are a few methods you need to implement.  One expresses the dependencies that your Layer has on other Layers.  Another is sort of a factory method for FacetExtensions - given a Facet you must return a FacetExtension to be associated with the Layer.  Beyond this you can add whatever code you want to the LayerExtension to implement the behavior you need.&lt;br /&gt;&lt;br /&gt;You can use a single FacetExtension subclass for your layer or derive a more complex class hierarchy.  There are currently no abstract methods in FacetExtension that you must implement.  As before you can add whatever Java code you need to satisfy the purpose of the layer.&lt;br /&gt;&lt;br /&gt;Once a FacetExtension is created for a Facet, that instance will remain on the Facet until the Facet is destroyed (which will happen when the base Figure or Site is destroyed).  This behavior could perhaps be relaxed but it's low on my todo list.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Navigating the Lattice&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Faceted, Facet and FacetExtension have methods to support easy navigation through the lattice.  These methods are based on the terminology shown in the figure below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/__TM2Gbu9_xc/R4WrU_Yk64I/AAAAAAAAAAs/vdihya_2FaA/s1600-h/TreeOrientation.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/__TM2Gbu9_xc/R4WrU_Yk64I/AAAAAAAAAAs/vdihya_2FaA/s400/TreeOrientation.png" alt="" id="BLOGGER_PHOTO_ID_5153713725695650690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So getSuperior() returns the Part or Extension immediately above (towards the root of the tree) and getSubordinate(int) returns the one below indicated by the index parameter.  These methods have the (often annoying) characteristic that they flip-flop you from Figures to Sites and back.  Often you want to orient yourself on either Figures or Sites and then navigate around.  For this you can use getSup() and getSub(int). There is a getSize() method which returns the number of subordinates. Since getSize() will always return 1 (or 0) for a Site, there is also a getSize(boolean) which allows you to skip through Sites (when using getSub(int)).  (There should be methods like getSubs() and getSubordinates() that return an unmodifiable list, I just haven't been bothered enough to implement them yet).&lt;br /&gt;&lt;br /&gt;The FacetExtension variants of the methods take a Class parameter.  This allows a sort of diagonal movement through the Lattice. Imagine you are are implementing FooFacet. You could write getSuperior(BarFacet.class) to get the FacetExtension above and on the BarLayer.&lt;br /&gt;&lt;br /&gt;In addition to lateral (and diagonal) movement we need to navigate directly between layers and also back and forth between the Extensions and the Parts.  There are methods for all of this. A typical thing is to go from one FacetExtension to another. Again imagining a FooFacet, we could write getFx(BarFacet.class) to get the FacetExtension of the BarLayer associated with the same Faceted part.&lt;br /&gt;&lt;br /&gt;Similar to getFx(Class) there are getLx(Class) methods to return a specific LayerExtension.  So you could write getLx(BarLayer.class) to get the BarLayer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Figures and Sites&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Why do we even need Sites?  We could get rid of them and halve the size of this (fairly huge looking) data structure. Perhaps the best answer I have is that my intuition tells me to keep the Sites for now.  Here's some of the thinking behind the intuition:&lt;br /&gt;&lt;br /&gt;What is modeling? My one sentence definition of software modeling goes something like this:&lt;br /&gt;&lt;blockquote&gt;Given a reasonable definition of "software object", &lt;span style="font-weight: bold;"&gt;software modeling&lt;/span&gt; is about formalizing (or making "first-class") the relationships between objects.&lt;br /&gt;&lt;/blockquote&gt;Another definition I like is:&lt;br /&gt;&lt;blockquote&gt;A model is a collection of objects with &lt;span style="font-style: italic;"&gt;managed&lt;/span&gt; relationships.&lt;/blockquote&gt;If you are an EMF programmer, you should at least partially agree.  One of the great things about EMF is that it generates all the hairy code necessary to manage the references and keep everything well connected.&lt;br /&gt;&lt;br /&gt;So going back to Figures and Sites, I think of Figures as the "elements" or the primary points of interest and Sites are the first-class representation of the relationship between Figures.&lt;br /&gt;&lt;br /&gt;Of course Sites are just a representation of the &lt;span style="font-style: italic;"&gt;containment&lt;/span&gt; relationship.  There are many other kinds of relationships to model.  So let me go even farther out on a limb:  In the Lattice Metamodel, I'm treating the containment relationship as the fundamental relationship in the modeling system.  Other kinds of relationships will be implemented in Layers (and discussed in other posts).&lt;br /&gt;&lt;br /&gt;Another bit of (possibly faulty) intuition:  I like to think of Sites as "neutral ground" between Figures, because I've run into a lot of tree programming situations where I have data that doesn't seem to belong either to the parent or child node - it needs to be shared by both on equal terms.&lt;br /&gt;&lt;br /&gt;So for now the Sites stay.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-9077829768260726079?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/9077829768260726079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=9077829768260726079' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/9077829768260726079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/9077829768260726079'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/lattice-metamodel.html' title='The Lattice Metamodel'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/__TM2Gbu9_xc/R4MQy_Yk62I/AAAAAAAAAAc/4nB57W4JKHY/s72-c/PartHierarchy.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-1845122311972007293</id><published>2008-01-07T20:50:00.000-08:00</published><updated>2008-01-13T23:23:06.203-08:00</updated><title type='text'>Related Material</title><content type='html'>This post has some links to material that's related to Gem and the Lattice Metamodel in some way or another.  I'm writing this both to credit the authors that have informed and inspired me and to give a sense of my "mental map" in this area.  If you are familiar with many of these links then I'd guess you will find Gem interesting - at least as a curiosity.  If you know of other material like this, please comment and help expand my mental map!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(Note: this needs a lot more work.  If I were to dig through my notes, I could easily add dozens more links to content that informed my work here in some way or another - I just haven't had time.)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Software Modeling&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;UML (&lt;a href="http://www.uml.org/"&gt;homepage&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Unified_Modeling_Language"&gt;wikipedia&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.eclipse.org/modeling"&gt;Eclipse Modeling Project&lt;/a&gt; - especially &lt;a href="http://www.eclipse.org/modeling/emf"&gt;EMF&lt;/a&gt; and &lt;a href="http://www.eclipse.org/modeling/gmf"&gt;GMF&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Domain Specific Languages&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Martin Fowler - &lt;a href="http://martinfowler.com/bliki/DomainSpecificLanguage.html"&gt;DSLs&lt;/a&gt; and &lt;a href="http://martinfowler.com/articles/languageWorkbench.html"&gt;Language Workbenches&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Microsoft's &lt;a href="http://msdn2.microsoft.com/en-us/teamsystem/aa718368.aspx"&gt;DSL Tools&lt;/a&gt; project&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Graph Drawing&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.graphdrawing.org/"&gt;graphdrawing.org&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.graphviz.org/"&gt;GraphViz&lt;/a&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sourceforge.net/projects/eclipsegraphviz"&gt;Eclipse GraphViz&lt;/a&gt; integration&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Self Links&lt;/span&gt; - Other project I've worked on that are somewhat related.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sourceforge.net/projects/locos/"&gt;Locos&lt;/a&gt;, &lt;a href="http://sourceforge.net/projects/stef/"&gt;Stef&lt;/a&gt;, &lt;a href="http://sourceforge.net/projects/hombre/"&gt;Hombre&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.eclipse.org/Gymnast"&gt;Gymnast&lt;/a&gt; and &lt;a href="http://wiki.eclipse.org/Emfatic"&gt;Emfatic&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Blogs&lt;/span&gt; - with an orientation toward programming language design topics:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://steve-yegge.blogspot.com/"&gt;Steve Yegge&lt;/a&gt; (see especially the &lt;a href="http://steve-yegge.blogspot.com/2007/02/next-big-language.html"&gt;NBL&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.paulgraham.com/articles.html"&gt;Paul Graham&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.joelonsoftware.com/"&gt;Joel on Software&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://lambda-the-ultimate.org/"&gt;Lambda the Ultimate&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-1845122311972007293?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/1845122311972007293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=1845122311972007293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/1845122311972007293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/1845122311972007293'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/related-material.html' title='Related Material'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-5948365250363913001</id><published>2008-01-05T19:26:00.001-08:00</published><updated>2008-01-13T23:18:19.972-08:00</updated><title type='text'>Rants and Raves</title><content type='html'>The original idea behind Gem was to try to design a programming language that could unify graphics (notation), execution (semantics) and modeling (structure) in the simplest way I can devise.&lt;br /&gt;&lt;br /&gt;In the graphical realm I want to explore the idea of textual language syntax that suggests and flows into graphical representations.  For example ( ) may suggest a circle or a radial layout and [ ] may suggest a box or a rectangular layout.&lt;br /&gt;&lt;br /&gt;In the modeling realm I'm interested in the parallels between metamodels and grammatical languages (e.g. &lt;a href="http://en.wikipedia.org/wiki/Backus-Naur_form"&gt;BNF&lt;/a&gt;) and how we can apply the insights and methods of the latter subject to the former.  I'm also inspired by how &lt;a href="http://www.eclipse.org/modeling/emf"&gt;EMF&lt;/a&gt; with a dozen or so primitive constructs (in Ecore.ecore) can tame the hugeness of UML.  I'd like to search for other (meta)metamodels that are similarly simple, general and provide great leverage.&lt;br /&gt;&lt;br /&gt;For execution all I can say is that I'll be happy when I have a model debugger and can step through a program model and watch it modify a data model (or itself).&lt;br /&gt;&lt;br /&gt;There are some other ideas that feed into this project.  They mostly amount to things that aggravate me with existing tools which I'd like to try to improve:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Modeling tools tend to have a central diagram space and a separate area for viewing and editing "properties".  Getting anything done requires a lot of mousing back-and-forth between these two areas.  I'd like to try to get rid of the properties view entirely and do all editing in the diagram space.&lt;/li&gt;&lt;li&gt;I think the keyboard has been greatly underutilized in modeling tools.  I should be able to type in model fragments as text and have them parsed and redisplayed in whatever diagrammatic notation I'm currently using to view the model.&lt;/li&gt;&lt;li&gt;A lot of modeling systems use code generation as a mechanism for tailoring their behavior.  This can be good, but I'd like to resist it as long as possible.  All other things being equal, I'd prefer to use host language features (such as interface implementation) to allow developers to tailor the behavior.&lt;/li&gt;&lt;li&gt;The layout algorithms in graphical modeling tools rarely do what I want.  And I can spend a lot of time arranging things "just right" and then be forced to start over when I need to add or remove elements from the diagram.  I think there's an assumption that modelers want "freeform drawing".  Actually what I want almost always is good automatic layout.  I think the layout mechanism should work like a source code formatter: tweak some options (or model attributes) and then invoke the "reformat" action.&lt;/li&gt;&lt;/ul&gt;Another way I think about Gem (not the current implementation, but the Gem I'd like to get to) is as a visual/graphical programming language "done right".  Visual programming languages go all the way back to &lt;a href="http://en.wikipedia.org/wiki/Logo_%28programming_language%29"&gt;Logo&lt;/a&gt; (maybe farther) and I've played with several of them but I've never seen one that made me feel as productive as the textual programming languages I use.  I think if you polled a bunch of programmers and asked them, "will you ever prefer a graphical language over a purely text-based one?" very few would say 'yes' and many would say that it just isn't possible to have a graphical language that enhances productivity.  But if you asked these same people 10 years ago, "Will you ever feel more productive in an IDE than with your toolbox of emacs/vi, compiler, debugger, formatter, ... ?" many of them would have said 'impossible' then but are very happily using Eclipse, Visual Studio, etc.  today.&lt;br /&gt;&lt;br /&gt;So things do get better, and the impossible becomes the norm.  There has been a renaissance in programming language design over the last several years - which I think is great.  But the vast majority are textual languages.  Let's explore the second dimension. Now is not too early to be thinking about a viable graphical programming language.  I don't know if Gem will be that language (it certainly isn't close yet), but that's what I think it wants to be.  And even if it fails to become a viable language, it will be a success if it sheds new light on any of the ideas and aggravations discussed above.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-5948365250363913001?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/5948365250363913001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=5948365250363913001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/5948365250363913001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/5948365250363913001'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/rants-and-raves.html' title='Rants and Raves'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416762298289541834.post-812247711887853133</id><published>2008-01-05T18:12:00.000-08:00</published><updated>2008-01-13T23:40:09.706-08:00</updated><title type='text'>The Gem proto-language syntax</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/__TM2Gbu9_xc/R4byG_Yk65I/AAAAAAAAAA0/9pLKidu-1P8/s1600-h/GemLane.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/__TM2Gbu9_xc/R4byG_Yk65I/AAAAAAAAAA0/9pLKidu-1P8/s400/GemLane.png" alt="" id="BLOGGER_PHOTO_ID_5154073025479764882" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Gem models use a very simple textual concrete syntax which is described below.  I call this a &lt;span style="font-style: italic;"&gt;proto-language&lt;/span&gt; because there are no semantics tied directly to this syntax.  Instead the syntax is meant to be interpreted by processing layers applied to the model.  XML has a similar proto-language characteristic. You can write XML and use a tool to check that it is well-formed, but the meaning of the XML depends entirely on how you choose to interpret it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Gem Syntax Grammer&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Root := Expr&lt;span style="font-weight: bold;"&gt;*&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Expr := Prefix? (Token | Group | Quote) Suffix?&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Prefix := &lt;span style="font-style: italic;"&gt;A valid prefix Symbol with no space between it and the following Expr.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Suffix := &lt;span style="font-style: italic;"&gt;A valid suffix Symbol with no space between it and the preceding Expr.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Token := Word | Numeric | Operator&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Word := &lt;span style="font-style: italic;"&gt;A valid Java identifier.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Numeric := [&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;0&lt;/span&gt;&lt;/span&gt; .. &lt;span style="font-weight: bold;font-family:courier new;font-size:130%;"  &gt;9&lt;/span&gt;]+&lt;/li&gt;&lt;li&gt;Operator := Symbol&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Group :=  AngleGroup | CurlyGroup | ParenGroup | SquareGroup&lt;/li&gt;&lt;ul&gt;&lt;li&gt;AngleGroup := &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;&lt;&lt;/span&gt;&lt;/span&gt; Expr* &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;CurlyGroup := &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;/span&gt; Expr* &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;ParenGroup := &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;(&lt;/span&gt;&lt;/span&gt; Expr* &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;SquareGroup := &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;[&lt;/span&gt;&lt;/span&gt; Expr* &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Quote := DoubleQuote | SingleQuote&lt;/li&gt;&lt;ul&gt;&lt;li&gt;DoubleQuote := &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;"&lt;/span&gt;&lt;/span&gt; Fragment* &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;SingleQuote := &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;'&lt;/span&gt;&lt;/span&gt; Fragment* &lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Fragment := Text | Escape&lt;/li&gt;&lt;li&gt;Text := &lt;span style="font-style: italic;"&gt;A sequence of characters not containing an escape Symbol or quote terminator (&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt; or &lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Escape := CharEscape | ExprEscape&lt;/li&gt;&lt;ul&gt;&lt;li&gt;CharEscape := &lt;span style="font-style: italic;"&gt;A valid character escape Symbol followed by a character escape sequence.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;ExprEscape := &lt;span style="font-style: italic;"&gt;A valid expression escape Symbol followed by a single Expr.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Symbol := &lt;span style="font-style: italic;"&gt;A member of the set of characters on your keyboard which are not letters or digits.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;It's hard to get the look of the grammar correct in Blogger ... sorry about that.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;The characters &lt;/span&gt;&lt;span style="font-size:100%;"&gt;*, ?, | and + have their usual grammatical meanings:&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;* : a list of zero or more of the preceding rule&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;? : an optional single instance of the preceding rule&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;| : used between alternatives&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;+ : a list of 1 or more of the preceding rule&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Characters in large bold &lt;span style="font-family:courier new;"&gt;Courier&lt;/span&gt; like &lt;span style="font-weight: bold;"&gt;&lt;span style="font-family:courier new;"&gt;[&lt;/span&gt;&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;&lt;span style="font-family:courier new;"&gt;]&lt;/span&gt;&lt;/span&gt; are literals.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;The valid characters for Prefix, Suffix and Escape are not fixed here.  They can be assigned when initializing the parser.  I have been using ` (back-tick) and ~ (tilde) as prefixes and suffixes.  Currently ` is the CharEscape initiator (but it really should be \ to fit the C/Java style) and ~ is the ExprEscape initiator.  I'm considering adding ^ as a Prefix/Suffix.  All of these could change.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Examples&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="font-family: courier new;"&gt;Hello World!&lt;/li&gt;&lt;ul&gt;&lt;li&gt;two Words followed by an Operator&lt;/li&gt;&lt;/ul&gt;&lt;li style="font-family: courier new;"&gt;abc [123 {xyz} ]&lt;/li&gt;&lt;ul&gt;&lt;li&gt;use of Groups and Numerics (and Words)&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;For the following assume that &lt;span style="font-family:courier new;"&gt;~&lt;/span&gt; is a valid Prefix and &lt;span style="font-family:courier new;"&gt;^&lt;/span&gt; is a valid ExprEscape.&lt;br /&gt;&lt;ul&gt;&lt;li style="font-family: courier new;"&gt;~foo + ~ bar&lt;/li&gt;&lt;ul&gt;&lt;li&gt;the first ~ is a Prefix, the second is an Operator (because of the spacing)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="font-family: courier new;"&gt;"Hello ^{foo bar} World"&lt;/li&gt;&lt;ul&gt;&lt;li&gt;DoubleQuote with embedded CurlyGroup&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Possible Enhancements&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Add Infix and Outfix which would work like Prefix and Suffix but inside the Group delimiters like this:&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;AngleGroup := &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;span style="font-family:courier new;"&gt;&lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; Infix? Expr* Outfix? &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;span style="font-family:courier new;"&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Some way of indicating that certain groups don't apply within a scope (e.g. so &lt;&gt; can be used as Operators).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;The Numeric rule is currently just a string of digits. In the future it could be enhanced to allow more of the Java numeric literal syntax.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416762298289541834-812247711887853133?l=blog.pyramism.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.pyramism.net/feeds/812247711887853133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4416762298289541834&amp;postID=812247711887853133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/812247711887853133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416762298289541834/posts/default/812247711887853133'/><link rel='alternate' type='text/html' href='http://blog.pyramism.net/2008/01/gem-proto-language-syntax.html' title='The Gem proto-language syntax'/><author><name>Chris</name><uri>http://www.blogger.com/profile/14815664779902995406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/__TM2Gbu9_xc/R4byG_Yk65I/AAAAAAAAAA0/9pLKidu-1P8/s72-c/GemLane.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
