MGrammar
MGrammar
In case you missed it, we pushed out a new CTP this week of “Oslo”. You can get it at the Oslo Developer Center. New stuff includes: The "Quadrant" modeling tool. Use Quadrant to browse and edit models in a repository database. Domain models for the UML 2.1 specification encompassing Use Case, Activity, Class, Sequence, Component diagrams, profiles and templates. An XMI importer supporting the 2.1 specifications, and covering the diagrams identified above. A domain model and loader for System.Runtime. There...
Things have been a bit quiet around Panopticon Central lately due to the fact that I’ve been heads down on developing a particularly gnarly feature in M. More on that if and when it starts to see the light of day. But in the mean time, there have been a few interviews/talks that have been posted that I wanted to point out: I did a Code Cast interview with Ken Levy in which I talked about M, VB and apparently gave out the wrong address for this blog! I gave a talk with...
My post a few months ago entitled “DSLs: Definitely a bad idea!” certainly seemed to touch a nerve for some people. What was intended to be a sort of lighthearted throwaway entry engendered a lot stronger reactions than I’d expected. So I thought it might be worthwhile to back up for a second and revisit the issue, address some (though not all) of the comments, and talk about how they connect to how I see M. To start with, yes, of course, I was engaging in a bit of hyperbole by saying that DSLs are a “bad idea.” DSLs...
Having covered tokens vs. syntax, we can now talk about what “kind” of parser generator MGrammar is. As I said in a previous post, if you want the full discussion of parser generators you should really read the Dragon book, but here’s sort of how things go in a nutshell: There are traditionally two ways to interpret grammars: LL and LR. In both cases the first “L” means that the grammars read left-to-right. The second character indicates how the grammar is interpreted: “L” for left-to-right and “R” for right-to-left. An LL parser is also called a “top-down” parser because...
I want to talk in more detail about how the MGrammar parser works, but before I delve too deeply in to that I wanted to talk a little bit about some basic parsing concepts so we can be sure we’re on the same page. This may be a bit basic for some, so you can just skip ahead if you already know all this.
A language grammar is actually made up of two different grammars: a lexical grammar and a syntatic grammar. Although a grammar may not distinguish between the two in its specification (as we’ll see later), every grammar has...
Last Friday Rocky posted an entry on his weblog entitled “DSLs – fun, cool, but maybe a bad idea?” and my reaction was: Maybe a bad idea? Maybe a bad idea? Of course they’re a bad idea! This may seem strange coming from someone who’s working on the heart of Oslo/M’s DSL capabilities, but stick with me here… To begin with, writing a new language, domain-specific or not, is a lot like opening a restaurant: everyone thinks they can do it because they’ve eaten at one and it looks like fun. But...
As I’m sure regular followers of my blog are aware, I have a weakness for disclaimers. As I’ve starting thinking about how I want to talk in more detail about how the MGrammar parser generator works, I felt compelled to make yet another disclaimer: I am not a computer science theorist. The field of parser generation is an old and storied one (at least, relative to a lot of other things having to do with computers) and there’s a lot of theory that’s built up around it. I simply ask my readers to keep in mind that I am...
One of the major reasons that I decided to come to work on the Oslo team was the experience I had with what was going to become MGrammar. I was interested in prototyping some language and compiler design ideas, and I knew that the Oslo team had some technologies that might help me out, specifically a parser generator. They helpfully pointed me to their source code, I enlisted, built and started to play around. I’d been building some parser technology by hand, but I quickly discarded it once I started playing around with MGrammar in Intellipad. In addition to giving...
As some readers have noticed, I’ve been conspicuously silent since I moved over to the Oslo team. Some of this had to do with getting onto a new blogging engine, some of it had to do with various distractions like jury duty, but a lot of it had to do with the fact that Visual Basic 10.0 has gotten to a pretty stable state (so there isn’t so much for me to say any more) and I am just getting off the ground with Oslo. Not having much useful to say, I figured I’d be better off saying nothing at...
Full MGrammar Archive