This is basic form/prototype of a metaprogamming/compiler tool that I
have had in my mind for a long time. The tool converts the source
language to java language source code. Currently it supports conversion
of a hypothetical language called 'neo' to jave source file.
Once you download the rar file(neoCompiler_src_built-3.rar) ,
unrar(unzip) it, and go to that folder and compile it using javac (java
compiler) That is
javac neoCompiler.java
(In case you dont have javac, head on to
http://download.java.net/jdk6/binaries/ and click on the link *Windows
Offline Installation, Multi-language JDK file)*
In case you come across any difficulty, just issue the command
java neoCompiler -help
To convert a file, you must a create a file that follows the neo
standards. This simply means create a text file, type the neo commands,
save it
and issue the command
java neoCompiler <filename>
for example, with 3 steps you are into first steps of metaprogramming
1) type the following into neo.nlp text file(You can use any name or any
extension)
print("hello World");
2) Save the file,
3) convert it using
java neoCompiler neo.nlp
Now you will be having a file called helloworld.java in the current
directory. This would be a regular java file, which you can compile,
run or even use in other java programs.
--------------------------------------------------------------
If you find any bugs or want to add something to this project, please
post it as reply to this thread.
LICENSE
------------
This is a GPL v2 open source free software, you are free to modify and
distribute this code as long as you maintain the following information
in the distributed code.
*******************************************
Author : Justin
Website: justinlinux.blogspot.com
email : just...@gmail.com
Date:23-8-2007
**********************************************
I am happy to release another release candidate for built-6. For
installation, license and using this software, please refer the previous
thread on the same topic.
New features
========
1) Added the help option for sample program
Now if you issue the command
java neoCompiler - sample
a sample program, that uses neo programming language gets displayed
on the screeen.
2) The version extends the power of the compiler/meta programmer to
accommodate for the additional syntax that has been added to the neo
programming language.
New syntax support includes
======================
read()
------
read(int) - reads user input(integer type) from the keyboard
read(float) - reads user input(float type) from the keyboard
example:
int num;
num = read(int);
repeat(limit)
----------------
This function repeats a given number of statements, as the number
specified in the limit variable
format :
repeat(<number of times>)
example:
repeat(10)
{
print("hello world");
}
This prints hello world 10 times on the screen.
Other news
=========
A new project site, based on this project is planning to be started
pretty soon in code.google.com
Thank you for all you support and wishes.
Downloading
=========
To download the software, click the link below, for more information,
refer the previous thread or issued the follwing command at the command
prompt
java neoCompiler -help
1.1 unwanted substitution(major)
===========================
desciption
--------------
if you give system.out.println("");
^^ print in println gets
substitued , using the code subsitution, ie
it becomes
system.out.system.out.println("");ln("");