Old 19th September 2014, 06:47   #1
Junior Member
Join Date: Mar 2009
Posts: 4
My very incomplete MAKI compiler

Hi! I tried to re-implement the mc.exe. It was just an exercise in compilers technology I'm currently interested in, so I didn't try to make it usable. My goal was to get some bytecode similar to that of mc.exe. The goal was mostly met: the disassembler is able to load binaries from both compilers without having to guess which one the binary is from and the actual code looks about right.

The disassembler and the .NET interpreter of compiled .maki files were made in 2010 as an exercise, too. The specs were obtained from the mdc tool by Ralf Engels.

I could make the compiler work but there seems to be no C preprocessing library implemented in C#/.NET/CLR/you.got.it and I don't want to make one myself, nor do I want to bother with some external tool. So the input has to be preprocessed manually first.

Here's a couple of screenshots showing the tool "working":

Unlike mc.exe, it doesn't put every external type to the binary, so resulting files are smaller. I also played with type checking a bit, but it doesn't quite work for elementary types yet, and this makes the compiler unusable, too. Hell, it doesn't even accept arguments, too much stuff is simply hardcoded in there.

The parser is generated from "empirical" grammar by the ANTLR4 tool (C# target). The grammar file is included.

Ok, I'm just leaving these pieces of incoherent code here for those who shares the fetish of making compilers for languages they started programming with. Gotta move on.
Attached Files
File Type: zip MakiTool.zip (1.97 MB, 201 views)
Entrase is offline   Reply With Quote
Old 27th September 2014, 19:15   #2
Late skinner & Moderator
Victhor's Avatar
Join Date: May 2003
Location: Argentina
Posts: 1,619
Thanks for sharing, it could be helpful for some of the code-wise around here.

For those looking for a proper compiling method / tool, check here and here (Win8). The first method / link should be somewhere else around this forum too..
Victhor is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

compiler, maki, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump