Adding languages - Tricky1975/kitty GitHub Wiki

(Note, this document is still in draft... More info will come later).

General approach

Kitty has the base class "KittyHigh" and all classes used to add language support must be extensions of that class. Most programming language are extensions of "KittyPL" (Programming Language, or Programming Lexer), which is already an extension and contains a very simplistic lexer which will work with most programming languages... C, Pascal and BASIC are not that much different from each other as you may think, after all.

Now Brainfuck as an esolang with only 8 characters didn't really benefit from using the basic lexer so you could see that I gave it it very own lexer, directly based on KittyHigh. When it comes to MarkUp languages such as MarkDown, HTML and such, a different base lexer may also be preferable.

Now as Kitty is very simplistic the lexer and shower are basically the same thing in Kitty. The Show() method serves for that, so if you have a language with a bit of a different approach you can override that method to get your stuff done.

In later versions of this document I may at bit in more detail how stuff really works "Under da hood"