I think I have a good enough alpha-stage program for everyone to play with but please don't be surprised that the indentation is/gets goofy (I really need to think up a better way to implement this feature) or the output isn't what you expected
(see note #2).
I am attaching an installer that will extract an executable for you to test/play with (it is an interpreter). If you double click the exe you should note that this program is doing it's thing as you type--that means that, when you type something it knows how to parse, it reports back right away (Kinda like an overanxious child) and you will have to use
CTRL-Z to exit the program. I have also included a text file which gives several usable examples. At this point, passing a file to the program would be the preferred method of interaction
(see note #1), instead of launching it and typing outright (aka Double clicking the exe).
Introducing: "
Kaylee".
Kaylee is a simple programming language, parser and code generator that will convert the
Kaylee language to an AutoLisp representation.
Steps you need to take:
1. Use the installer to extract(install) the .exe (the default location is: C:\Kaylee).
2. Open a command prompt to the location you installed it (start->run->cmd.exe ... "
cd C:\Kaylee\").
3. Issue the following on the command prompt (no quotes): "
Kaylee.exe < Kaylee-Test.txt"
The
Kaylee parser should have printed some AutoLisp back to the command prompt.
Note:
1. If you want a file output instead you can use the following (no quotes):
"
Kaylee.exe < Kaylee-Test.txt > Kaylee-Test-Output.lsp"
2. The parser and code generator is easily confused so don't be surprised if wonky results are given.
3. The code examples above may not work. The "Kaylee-Test.txt" demonstrates proper syntax's but this is an example:
def forFoo(n)
for i = 1, i < n, 1.0 {
1 + 2
2 + 3
i + n
}
end;
The above code-snip isn't really C++ code but the forum's C++ syntax highlighting will work to highlight the components in this example.Will produce:
(+ 1 2)
(+ 2 3)
(+ i n)
)
)
Enjoy.