Language Builder IDE

Published February 06, 2011
Advertisement
A few months back I detailed my work on an HLSL plugin for Visual Studio that would add syntax highlighting and IntelliSense support. I had to take a break from that for a while, but I started up again last week, and I've taken things in a new, more generalized direction.

Rather than work on the HLSL parser itself, I've focused my efforts on a language builder IDE, that provides tools to easily build complete front-ends for languages, including support for all of the features people have come to expect from a language's tools. I'm calling this project SlimLang for now because I'm unimaginative and the "Slim" moniker has a good reputation associated with it.

Work on the incremental parser has been difficult, due both to the complexity as well as lack of information on them out on the net, so one of the tools I really want to add to the IDE is a built-in debugger to allow stepping through the parser as it runs and see the output as a visual graph as it's being constructed. It should really help my implementation of the parser, which I can then provide as a separate component to use in conjunction with the parse tables generated by the IDE.

For the visual graph part, I found the library OpenGraph and Graph#, and for the text editor for specifying the language grammar I found AvalonEdit, both of which are WPF libraries, so I decided to take my project in that direction. I haven't been fond of WPF, but recent changes in WPF4 have definitely improved things for the better. Compare the text rendering quality between the old and new versions below:

old.png new.png

You can also see from those images my work on a tab control style that mimics the property page tab found in Visual Studio. I didn't know much about styling when I started, so it was basically a crash course for me. The ends results are pretty good though:

control.png

I integrated the text editor to allow for specifying the grammar and wrote a quick manual parser to read it. Also got the error list hooked up nicely. All in all, it was a good few days of work.

editor.png

Also some work using a DataGrid for editing terminal options:

terminals.png

Hopefully this should make further work on the HLSL plugin much easier, as well as provide a platform for anyone with a personal scripting language to create easy plugins for language support, which can really aid usage and adoption of a new language.

I was thinking about making these two things open source (the HLSL plugin and the SlimLang IDE), but I'm also leaning towards providing them for sale to try to get some actual income. Any thoughts on whether these two tools would be useful enough to anyone to be worth spending the money?
Previous Entry The Downward Spiral
Next Entry New Job
1 likes 4 comments

Comments

Shadowdancer
Technical aspects aside, "Colorizing"? Wouldn't "Colors" do it? ;-)
February 08, 2011 10:44 AM
Jason Z
This looks pretty cool, and the UI looks nice and clean. I'm still not entirely sure what it is used for though - is this used to generate the plugin for syntax highlighting in VS, or to generate parse tables, or something else? Also, if you are thinking of selling it, can you mention a few things that it does that competing open/closed source solutions don't do?
February 08, 2011 08:01 PM
Mike.Popoloski
[quote name='Jason Z' timestamp='1297195281']
This looks pretty cool, and the UI looks nice and clean. I'm still not entirely sure what it is used for though - is this used to generate the plugin for syntax highlighting in VS, or to generate parse tables, or something else? Also, if you are thinking of selling it, can you mention a few things that it does that competing open/closed source solutions don't do?
[/quote]

Essentially it generates a data file containing all the information for a language service, which includes the parse tables, information on colorizing the code, information on how IntelliSense should work, where and when to add things to the symbol table, which parts of the code denote the start and end of a scope, etc. Also it serves as a debugging platform for you when you're designing your language grammar.

Writing the actual plugin for VS will be left up to the user, but you can use this program, along with an included library which contains the incremental parser, to write one very easily. I'll probably include an exporter in the IDE to generate a VS project that sets most of that up for you, so that you can just do a build on the generated project and have your language service basically done.

As for how it's different, well, I can't really find anything that's quite like this. There are of course plenty of parser generators out there, but none of them generate incremental parsers, which are important if you want your IntelliSense engine to be fast enough for real time use. So you get the incremental parser, which I don't see offered anywhere else, and you get the IDE for building and debugging your language quite easily.

The only thing close is the Managed Babel framework provided by Microsoft, but that tool is difficult to find information on and difficult to use as well. Additionally, it still requires a fair bit of code on the part of the user to handle things like the symbol table and the preprocessor, and it also requires interfacing with one of the standard parser generators available, none of which I have found are incremental in nature.
February 09, 2011 01:07 AM
SebastienSt-Laurent
Is the code for the HLSL parser locked down with the "to open source or not" dilema? I was looking into a project involving HLSL to GLSL conversion and figured the grammar could provide a good starting point. But right now if I go to the google code page for the project, I get a 403 error.
August 27, 2011 05:28 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

New Blog

2022 views

Progress Update

1550 views

Start of Project

1513 views

New Job

2220 views

The Downward Spiral

2879 views

Job Interviews

1480 views
Advertisement