views:

248

answers:

4

When it comes to making an IDE (e.g. SharpDevelop) or a compiler/language parser, what topics of computer science do I need to know? I don't expect a full list of in depth tutorials but just a list of topics which would benefit me in improving.

Am I right in thinking a parser has some rules about the syntax/semantics of a language, and validates the code based on these rules? That seems like a simple approach?

Thanks

+4  A: 

For implementing a compiler / language, you will need a fundamental understanding of:

  • BNF & EBNF - Context-Free Grammers (the syntax rules)
  • Lexical Analyzing Techniques & Tools (Lex / Bison)
  • Parsing Techniques (eg. Recursive Decent, LL, LR)
mmattax
A: 

If you're writing a compiler, a good Computer Science course in Theory of Language Translation or something similar is pretty much essential. MIT Open Courseware offers a "Computer Language Engineering" class along those lines. That should teach you the concept that mmattax mentions and provide a good start.

As for an IDE, that's really more of a desktop application project. You might be calling a compiler from your IDE, but you're not actually compiling code (though, to be fair, in a sophisticated IDE, you might be parsing code). So the knowledge required to build an IDE that calls an external compiler/linker would be more centered around the UI toolkit of whatever platform you're using, with perhaps a bit of compiler front-end theory (as you would learn in a compiler course) if you want to parse code.

MattK
A: 

Sorry but the answer is "The whole of computer science and years of practical experience".

Its too big a subject for ordinary mortals and eclipse, intellij, netbeans and Visual... have the subject pretty well covered.

Look at something smaller and more achievable like an eclipse plugin for something that interests you.

James Anderson
Why was this downmodded? +1 becaus I agree about the eclipse idea
Nifle
-1 for pessimism and discouragement. No-one knows the whole of computer science, and much of it only existed after the first compilers were written.
Pete Kirkham
+2  A: 

An IDE, a compiler and a debugger are three different beasts.

Here's a quick and slightly random selection of some links that I've found interesting or inspiring when thinking about building modeling tools for simulation languages, which is as close as I get to IDE:

There's somewhat of a bias in those links towards patterns to help reading and browsing rather than writing code, and towards systems the user extends while using them rather than as a separate cycle; if you want a task-oriented interface or static plugins, projects for existing IDEs such as Eclipse are the place to look.

Pete Kirkham