Search code examples
ideprogramming-languages

How to add your own programming language to IDE?


There is the simple interpretive programming language and, actually, console interpreter.exe. Need to make colorizing of syntax, autocomplete and executing by press F5. (if it is possible to make 'debug' - that will be awesome!)

I never did such things. There are many IDE, which allow to add lang.: eclipse, NetBeans, emacs, ... But I did not found complete instruction to add or they are ununderstandable.

What IDE is best to use? to add lang. as easy as possible? (it will be cool, if IDE can work in Windows) How to add my language there? Please, if it is possible to give complete instruction.


Solution

  • Depending on how far you really want to go there are multiple options:

    1. Dumb Autocompletion for text editors: There are editors like scite aka Notepad++, that take a simple textfile with all the keywords to give you autocompletion, but they don't take into account the syntax nor the context. All they do is to highlight the words they know (e.g. you have given to them) and to autocomplete just these terms.
    2. Smarter Syntax Highlighting: This would require you to get used to the tools lex and yacc, if we are talking open source. I don't know which proprietary source tools are out there. If you want to get into that, there are several good pages on that topic, and this is one of them.
    3. Compile it all the time: A simple but effective method for small projects would be just to compile it once every few seconds, and interpret the output. This would be the messy version, but might be fun to look into.