<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>IgorShare Weblog &#187; Oslo</title>
	<atom:link href="http://igorshare.wordpress.com/category/net/oslo/feed/" rel="self" type="application/rss+xml" />
	<link>http://igorshare.wordpress.com</link>
	<description>Practical Engineering</description>
	<lastBuildDate>Thu, 31 Dec 2009 16:39:30 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='igorshare.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/3e81c82619fe2ddae5ef1340b5d57788?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>IgorShare Weblog &#187; Oslo</title>
		<link>http://igorshare.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://igorshare.wordpress.com/osd.xml" title="IgorShare Weblog" />
		<item>
		<title>Oslo: Basic M grammar for a generic Language</title>
		<link>http://igorshare.wordpress.com/2009/03/23/oslo-basic-m-grammar-for-a-generic-language/</link>
		<comments>http://igorshare.wordpress.com/2009/03/23/oslo-basic-m-grammar-for-a-generic-language/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 17:29:41 +0000</pubDate>
		<dc:creator>igormoochnick</dc:creator>
				<category><![CDATA[M]]></category>
		<category><![CDATA[Oslo]]></category>

		<guid isPermaLink="false">http://igorshare.wordpress.com/2009/03/23/oslo-basic-m-grammar-for-a-generic-language/</guid>
		<description><![CDATA[I’ve noticed that each time when I need to create yet another language definition or some rules grammar, I write the same (or a very similar) “prelude”. I guess that you do the same thing. To simplify the process I’ve crystallized this basis into a simple module. It contains the definition of a Whitespaces, Single- [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=igorshare.wordpress.com&blog=2434376&post=249&subd=igorshare&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I’ve noticed that each time when I need to create yet another language definition or some rules grammar, I write the same (or a very similar) “prelude”. I guess that you do the same thing. To simplify the process I’ve crystallized this basis into a simple module. It contains the definition of a Whitespaces, Single- and Multi-line comments and a commands list. You can reuse this module by importing it into your language definition.</p>
<p>Here is the example of a very simple language:</p>
<blockquote><p>// This is a comment </p>
<p>This_is_some_command;     <br />This_is_another_command; </p>
<p>/* This is a multi-     <br />line comment */ </p>
<p>This_is_the_last_command;</p>
</blockquote>
<p>The grammar is pretty trivial (if you reuse the foundation grammar – note the import in the beginning):</p>
<blockquote><p>module SomeLanguageModule     <br />{      <br />&#160;&#160;&#160; import LanguageBaseModule { Common as C };</p>
<p>&#160;&#160;&#160; @{CaseInsensitive}      <br />&#160;&#160;&#160; language RulesDefinition      <br />&#160;&#160;&#160; {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Delimiters      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; @{Classification[&quot;Delimiter&quot;]}      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token commandDelimiter = &quot;;&quot;;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; token Command = c:(C.AlphaNum | &quot;_&quot;)+;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // The Program     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; syntax Main       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = C.CommandList(Command, commandDelimiter);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Ignore whitespace      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; interleave Whitespace = C.Whitespace | C.Comment | C.MultiLineComment;      <br />&#160;&#160;&#160; }      <br />}</p>
</blockquote>
<p>The middle section of the grammar&#160; (Command) is where you concentrate your development efforts. Make sure to replace the Command “token” with Command “syntax”.</p>
<p>The Tree result from this grammar and the sample, shown at the top of this post, looks like this:</p>
<blockquote><p>Main[     <br />&#160; [      <br />&#160;&#160;&#160; &quot;This_is_some_command&quot;,      <br />&#160;&#160;&#160; &quot;This_is_another_command&quot;,      <br />&#160;&#160;&#160; &quot;This_is_the_last_command&quot;      <br />&#160; ]      <br />]</p>
</blockquote>
<p>Download the sample language and the grammar from my SkyDrive.</p>
<p>See the LanguageBaseModule grammar after the break …</p>
<p> <span id="more-249"></span>
<p>This is the LanguageBaseModule. It is as basic as it can get. The more complex and full version of a similar effort you can find in the Oslo SKD (Samples\MGrammar\Languages).</p>
<blockquote><p>module LanguageBaseModule     <br />{      <br />&#160;&#160;&#160; export Common; </p>
<p>&#160;&#160;&#160; language Common     <br />&#160;&#160;&#160; {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token Letter = &quot;a&quot;..&quot;z&quot; | &quot;A&quot;..&quot;Z&quot;;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token Digit = &quot;0&quot;..&quot;9&quot;;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token AlphaNum = Letter | Digit; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @{Classification[&quot;Number&quot;]}     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token Number = Digit+;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; // New line      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token LF = &quot;\u000A&quot;;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token CR = &quot;\u000D&quot;; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; token NewLine     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = LF      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; | CR      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; | CR LF      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Whitespace     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; @{Classification[&quot;Whitespace&quot;]}      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token Whitespace = WhitespaceCharacter+; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; token Space = &quot;\u0020&quot;;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token Tab = &#8216;\u0009&#8242;;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token WhitespaceCharacter       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = Tab&#160;&#160; // Horizontal Tab      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; | Space // Space      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; | NewLine      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Comments&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token CommentDelimitedContent =       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^(&#8216;*&#8217;)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; | &#8216;*&#8217;&#160; ^(&#8216;/&#8217;)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; @{Classification[&quot;Comment&quot;]}      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token Comment = &quot;//&quot; ^(&quot;\r&quot; | &quot;\n&quot;)+;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; @{Classification[&quot;Comment&quot;]}      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; token MultiLineComment = &quot;/*&quot; CommentDelimitedContent* &quot;*/&quot;; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Commands list     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; syntax CommandList(cmd, commandDelimiter)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = c:cmd commandDelimiter =&gt; [c]      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; | c:cmd commandDelimiter l:CommandList(cmd, commandDelimiter) =&gt; [c, valuesof(l)];      <br />&#160;&#160;&#160; }      <br />}</p>
</blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/igorshare.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/igorshare.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/igorshare.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/igorshare.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/igorshare.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/igorshare.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/igorshare.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/igorshare.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/igorshare.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/igorshare.wordpress.com/249/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=igorshare.wordpress.com&blog=2434376&post=249&subd=igorshare&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://igorshare.wordpress.com/2009/03/23/oslo-basic-m-grammar-for-a-generic-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/96b0fd2825bdeb9f9039b1259156b91b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IgorM</media:title>
		</media:content>
	</item>
		<item>
		<title>New Oslo bits are out &#8211; January CTP</title>
		<link>http://igorshare.wordpress.com/2009/02/03/new-oslo-bits-are-out-january-ctp/</link>
		<comments>http://igorshare.wordpress.com/2009/02/03/new-oslo-bits-are-out-january-ctp/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 20:50:17 +0000</pubDate>
		<dc:creator>igormoochnick</dc:creator>
				<category><![CDATA[M]]></category>
		<category><![CDATA[Oslo]]></category>

		<guid isPermaLink="false">http://igorshare.wordpress.com/2009/02/03/new-oslo-bits-are-out-january-ctp/</guid>
		<description><![CDATA[Yesterday got new Oslo bits (January CTP) – the upgrade went surprisingly smooth. Now I’m hands deep in this new pile of bits. Giving the credit that it’s still CTP – I like the progress so far. Can’t wait to see the release version.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=igorshare.wordpress.com&blog=2434376&post=229&subd=igorshare&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yesterday got <a href="http://www.pluralsight.com/community/blogs/dbox/archive/2009/01/30/fresh-oslo-bits.aspx">new Oslo bits (January CTP)</a> – the upgrade went surprisingly smooth. Now I’m hands deep in this new pile of bits. Giving the credit that it’s still CTP – I like the progress so far. Can’t wait to see the release version.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/igorshare.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/igorshare.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/igorshare.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/igorshare.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/igorshare.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/igorshare.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/igorshare.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/igorshare.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/igorshare.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/igorshare.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=igorshare.wordpress.com&blog=2434376&post=229&subd=igorshare&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://igorshare.wordpress.com/2009/02/03/new-oslo-bits-are-out-january-ctp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/96b0fd2825bdeb9f9039b1259156b91b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IgorM</media:title>
		</media:content>
	</item>
		<item>
		<title>IntelliPad (Oslo) switch to interactive mode</title>
		<link>http://igorshare.wordpress.com/2008/12/04/intellipad-oslo-switch-to-interactive-mode/</link>
		<comments>http://igorshare.wordpress.com/2008/12/04/intellipad-oslo-switch-to-interactive-mode/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 18:42:58 +0000</pubDate>
		<dc:creator>igormoochnick</dc:creator>
				<category><![CDATA[M]]></category>
		<category><![CDATA[Oslo]]></category>

		<guid isPermaLink="false">http://igorshare.wordpress.com/2008/12/04/intellipad-oslo-switch-to-interactive-mode/</guid>
		<description><![CDATA[For those who were asking: in order to switch the IntelliPad (Oslo) to interactive mode (MrEPL: REPL for M) follow these steps -

Once in Intellipad (with Samples) type “Ctrl-/” to get to the minibuffer. 
Type: SetMode(&#8216;MScriptMode&#8217;)

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=igorshare.wordpress.com&blog=2434376&post=195&subd=igorshare&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For those who were asking: in order to switch the IntelliPad (Oslo) to interactive mode (MrEPL: REPL for M) follow these steps -</p>
<ul>
<li>Once in Intellipad (with Samples) type “Ctrl-/” to get to the minibuffer. </li>
<li>Type: SetMode(&#8216;MScriptMode&#8217;)</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/igorshare.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/igorshare.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/igorshare.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/igorshare.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/igorshare.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/igorshare.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/igorshare.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/igorshare.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/igorshare.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/igorshare.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=igorshare.wordpress.com&blog=2434376&post=195&subd=igorshare&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://igorshare.wordpress.com/2008/12/04/intellipad-oslo-switch-to-interactive-mode/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/96b0fd2825bdeb9f9039b1259156b91b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IgorM</media:title>
		</media:content>
	</item>
		<item>
		<title>Oslo CTP is still pretty rough</title>
		<link>http://igorshare.wordpress.com/2008/10/31/oslo-ctp-is-still-pretty-rough/</link>
		<comments>http://igorshare.wordpress.com/2008/10/31/oslo-ctp-is-still-pretty-rough/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 14:20:08 +0000</pubDate>
		<dc:creator>igormoochnick</dc:creator>
				<category><![CDATA[Oslo]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://igorshare.wordpress.com/2008/10/31/oslo-ctp-is-still-pretty-rough/</guid>
		<description><![CDATA[Just noted a funny bug (hint: check the menu):

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=igorshare.wordpress.com&blog=2434376&post=194&subd=igorshare&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just noted a funny bug (hint: check the menu):</p>
<p><a href="http://igorshare.files.wordpress.com/2008/10/clip-image001.png"><img title="clip_image001" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="210" alt="clip_image001" src="http://igorshare.files.wordpress.com/2008/10/clip-image001-thumb.png?w=244&#038;h=210" width="244" border="0" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/igorshare.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/igorshare.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/igorshare.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/igorshare.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/igorshare.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/igorshare.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/igorshare.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/igorshare.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/igorshare.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/igorshare.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=igorshare.wordpress.com&blog=2434376&post=194&subd=igorshare&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://igorshare.wordpress.com/2008/10/31/oslo-ctp-is-still-pretty-rough/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/96b0fd2825bdeb9f9039b1259156b91b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">IgorM</media:title>
		</media:content>

		<media:content url="http://igorshare.files.wordpress.com/2008/10/clip-image001-thumb.png" medium="image">
			<media:title type="html">clip_image001</media:title>
		</media:content>
	</item>
	</channel>
</rss>