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.
Here is the example of a very simple language:
// This is a comment
This_is_some_command; This_is_another_command;
/* This is a multi- line comment */
This_is_the_last_command;
The grammar is pretty trivial (if you reuse the foundation grammar – note the import in the beginning):
module SomeLanguageModule { import LanguageBaseModule { Common as C };
The middle section of the grammar (Command) is where you concentrate your development efforts. Make sure to replace the Command “token” with Command “syntax”.
The Tree result from this grammar and the sample, shown at the top of this post, looks like this:
So many times I’ve noticed the nice coloring on the left side of the IntelliPad and followed all the instructions and, after defining all the necessary classifications, nothing happened.
The solution is very simple. [All this information I’ve found on the IntelliPad Team blog – these guys publish a lot of interesting stuff].
Apparently there is an IntelliPad Classification format configuration file. All the color scheme is defined there.
Just edit the file “%ProgramFiles%\Microsoft Oslo SDK 1.0\Bin\Intellipad\Settings\ClassificationFormats.xcml”. This is how to make the keywords blue:
I’m preparing a presentation for the upcoming CodeCamp about the best practices in building enterprise system that can scale to the cloud and stumbled on a real gem – the Dr. Werner Vogels Availability & Consistency presentation during QCon 2007. For those who doesn’t know – Dr. Werner Vogels is VP & CTO at Amazon.com.
In this presentation Dr. Vogels in crystal clear way lays out all the principals that I was a big promoter for the last 10 years. I agree with him on 100,000% and really think that the future is with the BASE scalable systems (and not with ACID) simply because ACID propagates the error to the end user whereas BASE system deals with errors locally. I do agree that in some rare cases ACID is the easier and cheaper way to go, but still sure that even those cases is possible to implement as BASE system.
The Dr. Vogels recipie for success is build system following this menu:
Autonomy
Asynchrony
Controlled concurrency
Controlled parallelism
Decentralize
Decompose into small well-understood building blocks
We’ve presented our Amigle startup during the very first local DemoCamp Boston. The event was organized very well – everything was on schedule and worked as a clock. As a personal preference I’d like to see more vibrant presenters and presentations the next time.