java aot compiler
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2902
Java Brainfuck Compiler 2.0
Java Brainfuck Compiler is an optimising Brainfuck to Java bytecode compiler. more>>
The Java Brainfuck Compiler is a compiler for the uniquely powerful Brainfuck language, which produces Java bytecode that will run on any Java Virtual Machine (with no intermediate steps such as going by way of Java code).
<<less Download (0.010MB)
Added: 2005-04-18 License: GPL (GNU General Public License) Price:
1682 downloads
JavaNativeCompiler 1.1.1
JavaNativeCompiler (JNC) is a Java to native compiler. more>>
JavaNativeCompiler (JNC) is a Java to native compiler. The project allows AOT (ahead of time) compilation of your Java applications. With JNC, you can create real standalone native binaries (.exe on Windows) which will no longer depend on a JRE.
This is especially useful when applications have to be deployed to end-users. All vexatious problems of deploying Java applications can be solved by compiling them to native. They will be:
- Easy to deploy
No JRE dependency. Most end-users dont know what they have installed.
No more problems on how to create an executable file out of a JAR or class file.
- Hard to decompile
Java can easily be decompiled. Native compilation will protect your source code.
- Run fast from the start
No more overhead for loading a JRE.
Enhancements:
- This release fixes a couple of problems with AWT/Swing and XML.
- It also once again contains a version for Linux.
- The compiler binary downloads are smaller.
<<lessThis is especially useful when applications have to be deployed to end-users. All vexatious problems of deploying Java applications can be solved by compiling them to native. They will be:
- Easy to deploy
No JRE dependency. Most end-users dont know what they have installed.
No more problems on how to create an executable file out of a JAR or class file.
- Hard to decompile
Java can easily be decompiled. Native compilation will protect your source code.
- Run fast from the start
No more overhead for loading a JRE.
Enhancements:
- This release fixes a couple of problems with AWT/Swing and XML.
- It also once again contains a version for Linux.
- The compiler binary downloads are smaller.
Download (MB)
Added: 2007-03-05 License: Other/Proprietary License with Source Price:
965 downloads
4tH compiler 3.5b
4tH is a Forth compiler with a little difference. more>>
4tH is a Forth compiler with a little difference. Instead of the standard Forth engine it features a conventional compiler.
4tH is a very small compiler that can create bytecode, C-embeddable bytecode, standalone executables, but also works fine as a scripting language. It supports over 85% of the ANS Forth CORE wordset and features conditional compilation, pipes, files, assertions, forward declarations, recursion, include files, etc.
It comes with an RPN calculator, line editor, compiler, decompiler, C-source generators, and a virtual machine.
Enhancements:
- More CORE words and most of the DOUBLE wordset are supported.
- Output buffers can be flushed.
- An experimental multitasking environment was added.
<<less4tH is a very small compiler that can create bytecode, C-embeddable bytecode, standalone executables, but also works fine as a scripting language. It supports over 85% of the ANS Forth CORE wordset and features conditional compilation, pipes, files, assertions, forward declarations, recursion, include files, etc.
It comes with an RPN calculator, line editor, compiler, decompiler, C-source generators, and a virtual machine.
Enhancements:
- More CORE words and most of the DOUBLE wordset are supported.
- Output buffers can be flushed.
- An experimental multitasking environment was added.
Download (0.18MB)
Added: 2007-05-20 License: LGPL (GNU Lesser General Public License) Price:
889 downloads
Java Games 1.0
Java Games is a collection of simple games that are compiled into Java applets and meant to be played online in a Web browser. more>>
Java Games project is a collection of simple games that are compiled into Java applets and meant to be played online in a Web browser.
Currently the collection contains four games: XO World (similar to tic-tac-toe, but with lines of 5 on a 10x10 board); 100 Mack (guess the random combination of 4 images out of a set of six); Memory (flip 2 plates at a time to find matching pairs); and Tetris.
<<lessCurrently the collection contains four games: XO World (similar to tic-tac-toe, but with lines of 5 on a 10x10 board); 100 Mack (guess the random combination of 4 images out of a set of six); Memory (flip 2 plates at a time to find matching pairs); and Tetris.
Download (0.13MB)
Added: 2007-02-20 License: GPL (GNU General Public License) Price:
985 downloads
GMP compiler 1.0.0
GMP compiler tool simplifies the use of GMP, the GNU multiple precision library. more>>
GMP compiler tool simplifies the use of GMP, the GNU multiple precision library. It scans a C source file for specially marked GMPS arithmetic expressions and replaces them with plain C.
The abbreviation gmpc stands for GMP compiler, or alternatively GMPS-to-C compiler. GMPS arithmetic expressions are straightforward infix expressions which transparently support the special types mpq_t, mpz_t and mpf_t as defined by GMP. GMPS means, rather unimaginatively, `GMP script.
No dependencies are added to the resulting C source, so there is no need to include additional header files or link with special libraries other than GMP.
Invoking gmpc
To translate a .gmpc file to C source, at least the input and output files must be given. The most concise invocation would look like this:
gmpc -o foo.c foo.gmpc
This will translate foo.gmpc into foo.c.
It is highly recommended to enable all warnings with the -Wall switch:
gmpc -Wall -o foo.gmpc foo.c
Other switches can be used to change the default behaviour of gmpc. They are listed in the following sections.
Enhancements:
- Added support for C-like compound assignments, increment and decrement operators.
- Fixed an assignment precedence bug.
- Temporary variables and constants are grouped together to make generated code more readable.
- Added Doxygen comments and configuration file.
<<lessThe abbreviation gmpc stands for GMP compiler, or alternatively GMPS-to-C compiler. GMPS arithmetic expressions are straightforward infix expressions which transparently support the special types mpq_t, mpz_t and mpf_t as defined by GMP. GMPS means, rather unimaginatively, `GMP script.
No dependencies are added to the resulting C source, so there is no need to include additional header files or link with special libraries other than GMP.
Invoking gmpc
To translate a .gmpc file to C source, at least the input and output files must be given. The most concise invocation would look like this:
gmpc -o foo.c foo.gmpc
This will translate foo.gmpc into foo.c.
It is highly recommended to enable all warnings with the -Wall switch:
gmpc -Wall -o foo.gmpc foo.c
Other switches can be used to change the default behaviour of gmpc. They are listed in the following sections.
Enhancements:
- Added support for C-like compound assignments, increment and decrement operators.
- Fixed an assignment precedence bug.
- Temporary variables and constants are grouped together to make generated code more readable.
- Added Doxygen comments and configuration file.
Download (0.27MB)
Added: 2006-12-25 License: GPL (GNU General Public License) Price:
1044 downloads
Aubit 4GL compiler 1.00.44
Aubit 4GL compiler is a project to make a free Informix-4GL compatible compiler. more>>
Aubit 4GL compiler is a project to make a free Informix-4GL compatible compiler. Aubit 4GL compiler translates 4GL source into executable programs, enabling fast creation of screen/form-based applications.
With support for SQL statements forming an intrinsic part of the language, its especially suitable for developing database-oriented applications. Database connectivity is provided for PostgreSQL, Informix, and ODBC. It supports both ncurses (console mode) and GTK+ (GUI mode) output.
<<lessWith support for SQL statements forming an intrinsic part of the language, its especially suitable for developing database-oriented applications. Database connectivity is provided for PostgreSQL, Informix, and ODBC. It supports both ncurses (console mode) and GTK+ (GUI mode) output.
Download (5.5MB)
Added: 2007-06-18 License: LGPL (GNU Lesser General Public License) Price:
546 downloads
Scriptol Compilers 6.2
Scriptol is an object oriented programming language. more>>
Scriptol is an object oriented programming language designed to deliver the programmer from hardware or software constraints and let him or her concentrate only on the problem to formulate as a program.
Scriptol Compilers is universal, and allows building dynamic Web pages (with PHP as the backend), writing scripts, and building binary applications. It is compatible with Java and C++ libraries. Examples of use with PHP, Java, and GTK are included.
How to install the Java extension for Php or C++
1) Installing Java for Php
Search for the java path, example:
c:jdk1.4
Search for the php extensions path, example:
c:phpextensions
The extension directory must hold these files:
php_java.dll
php_java.jar
Set these lines into php.ini (in the Windows directory)
extension_dir = c:phpextensions
extension=php_java.dll
Search for the [java] section in php.ini - java.class.path must be assigned the path of all jar or class files including php_java.jar, separated by a semi-colon. (You can use a dot to designate the current path for yours jar or class file) - java.home
must be assigned the path of Java. - java.library
must be assigned the path of jvm.dll. - java.library.path
must be assigned the path of php extensions, that hold php_java.dll and php_java.jar and the path of any Java class you want to use.
- If these classes are inside jar files, the jar filenames are a part of the path.
- If several paths are required, they are separated by semicolons and enclosed in double quotes.
Example:
[Java]
java.class.path = "c:phpextensionsphp_java.jar;c:myclasses"
java.home = "c:jdk1.4"
java.library = "c:jdk1.4jrebinclientjvm.dll"
java.library.path = "c:phpextensions;c:jdk1.4jrelib"
2) Installing Java for Scriptol C++
- The jvm.dll must be in the path.
- The jvm.lib, jni.h, jni_md.h files must be in the directory of the source.
- The JAVA_HOME variable must be assigned the path of the JDK (ex: c:jdl1.4).
- See the README file if you encounter problems...
<<lessScriptol Compilers is universal, and allows building dynamic Web pages (with PHP as the backend), writing scripts, and building binary applications. It is compatible with Java and C++ libraries. Examples of use with PHP, Java, and GTK are included.
How to install the Java extension for Php or C++
1) Installing Java for Php
Search for the java path, example:
c:jdk1.4
Search for the php extensions path, example:
c:phpextensions
The extension directory must hold these files:
php_java.dll
php_java.jar
Set these lines into php.ini (in the Windows directory)
extension_dir = c:phpextensions
extension=php_java.dll
Search for the [java] section in php.ini - java.class.path must be assigned the path of all jar or class files including php_java.jar, separated by a semi-colon. (You can use a dot to designate the current path for yours jar or class file) - java.home
must be assigned the path of Java. - java.library
must be assigned the path of jvm.dll. - java.library.path
must be assigned the path of php extensions, that hold php_java.dll and php_java.jar and the path of any Java class you want to use.
- If these classes are inside jar files, the jar filenames are a part of the path.
- If several paths are required, they are separated by semicolons and enclosed in double quotes.
Example:
[Java]
java.class.path = "c:phpextensionsphp_java.jar;c:myclasses"
java.home = "c:jdk1.4"
java.library = "c:jdk1.4jrebinclientjvm.dll"
java.library.path = "c:phpextensions;c:jdk1.4jrelib"
2) Installing Java for Scriptol C++
- The jvm.dll must be in the path.
- The jvm.lib, jni.h, jni_md.h files must be in the directory of the source.
- The JAVA_HOME variable must be assigned the path of the JDK (ex: c:jdl1.4).
- See the README file if you encounter problems...
Download (1.6MB)
Added: 2007-03-11 License: Freeware Price:
958 downloads
Blatte::Compiler 0.9.4
Blatte::Compiler is a Perl module to compile a Blatte document into Perl. more>>
Blatte::Compiler is a Perl module to compile a Blatte document into Perl.
SYNOPSIS
use Blatte::Compiler;
&Blatte::Compiler::compile($file_handle, &callback);
&Blatte::Compiler::compile_sparse($file_handle, &callback);
sub callback {
my($val, $src) = @_;
if (defined($src)) {
...Blatte expression...
} else {
...plain text...
}
}
This is a convenient interface for parsing a file full of Blatte code. A file handle and a callback are passed to compile() or compile_sparse() (see below for the difference between the two). The callback is then invoked for each top-level item parsed from the input.
The compile() function treats its entire input as a sequence of Blatte expressions, including plain text at the top level, which is divided up into Blatte "words," each of which is one Blatte expression. The callback is called once for each expression, with two arguments: the Perl string resulting from parsing the Blatte expression; and the Blatte source string itself.
The compile_sparse() function works the same way, except that plain text at the top-level of the input is not divided into words. Only Blatte expressions beginning with a Blatte metacharacter are parsed as described above. All text in between such expressions is passed as a single string to the callback, with no second argument.
<<lessSYNOPSIS
use Blatte::Compiler;
&Blatte::Compiler::compile($file_handle, &callback);
&Blatte::Compiler::compile_sparse($file_handle, &callback);
sub callback {
my($val, $src) = @_;
if (defined($src)) {
...Blatte expression...
} else {
...plain text...
}
}
This is a convenient interface for parsing a file full of Blatte code. A file handle and a callback are passed to compile() or compile_sparse() (see below for the difference between the two). The callback is then invoked for each top-level item parsed from the input.
The compile() function treats its entire input as a sequence of Blatte expressions, including plain text at the top level, which is divided up into Blatte "words," each of which is one Blatte expression. The callback is called once for each expression, with two arguments: the Perl string resulting from parsing the Blatte expression; and the Blatte source string itself.
The compile_sparse() function works the same way, except that plain text at the top-level of the input is not divided into words. Only Blatte expressions beginning with a Blatte metacharacter are parsed as described above. All text in between such expressions is passed as a single string to the callback, with no second argument.
Download (0.031MB)
Added: 2007-04-20 License: Perl Artistic License Price:
917 downloads
Obfuscated Tiny C Compiler
Obfuscated Tiny C Compiler (OTCC) is a very small C compiler. more>>
Obfuscated Tiny C Compiler (OTCC) is a very small C compiler I wrote in order to win the International Obfuscated C Code Contest (IOCCC) in 2002.
My goal was to write the smallest C compiler which is able to compile itself. I choose a subset of C which was general enough to write a small C compiler. Then I extended the C subset until I reached the maximum size authorized by the contest: 2048 bytes of C source excluding the ;, {, } and space characters.
I choose to generate i386 code. The original OTCC code could only run on i386 Linux because it relied on endianness and unaligned access. It generated the program in memory and launched it directly. External symbols were resolved with dlsym().
In order to have a portable version of OTCC, I made a variant called OTCCELF. It is only a little larger than OTCC, but it generates directly a dynamically linked i386 ELF executable from a C source without relying on any binutils tools! OTCCELF was tested succesfully on i386 Linux and on Sparc Solaris.
NOTE: My other project TinyCC which is a fully featured ISOC99 C compiler was written by starting from the source code of OTCC !
Compilation:
gcc -O2 otcc.c -o otcc -ldl
gcc -O2 otccelf.c -o otccelf
Self-compilation:
./otccelf otccelf.c otccelf1
<<lessMy goal was to write the smallest C compiler which is able to compile itself. I choose a subset of C which was general enough to write a small C compiler. Then I extended the C subset until I reached the maximum size authorized by the contest: 2048 bytes of C source excluding the ;, {, } and space characters.
I choose to generate i386 code. The original OTCC code could only run on i386 Linux because it relied on endianness and unaligned access. It generated the program in memory and launched it directly. External symbols were resolved with dlsym().
In order to have a portable version of OTCC, I made a variant called OTCCELF. It is only a little larger than OTCC, but it generates directly a dynamically linked i386 ELF executable from a C source without relying on any binutils tools! OTCCELF was tested succesfully on i386 Linux and on Sparc Solaris.
NOTE: My other project TinyCC which is a fully featured ISOC99 C compiler was written by starting from the source code of OTCC !
Compilation:
gcc -O2 otcc.c -o otcc -ldl
gcc -O2 otccelf.c -o otccelf
Self-compilation:
./otccelf otccelf.c otccelf1
Download (0.004MB)
Added: 2006-03-29 License: GPL (GNU General Public License) Price:
1318 downloads
Intel C++ Compiler 10.0
Intel C++ Compiler application is a full fledged C/C++ compiler and debugger suite. more>>
Intel C++ Compiler application is a full fledged C/C++ compiler and debugger suite. Its aim is to provide outstanding performance for all Intel 32-bit and 64-bit processors, while not requiring the need for porting applications from other compilers.
It provides optimization technology, threaded application support, and features to take advantage of Hyper-Threading technology. It is substantially source and object code compatible with GNU C, providing fullest compatibility with GCC and G++ 3.x/4.x both in terms of code and of API. It is thereby also easy to integrate with existing development environments.
<<lessIt provides optimization technology, threaded application support, and features to take advantage of Hyper-Threading technology. It is substantially source and object code compatible with GNU C, providing fullest compatibility with GCC and G++ 3.x/4.x both in terms of code and of API. It is thereby also easy to integrate with existing development environments.
Download (MB)
Added: 2007-06-28 License: Free for non-commercial use Price:
1400 downloads
Java Tools 0.30
Java Tools is a lightweight integrated development environment for creating, compiling, and executing Java applications. more>>
Java Tools is a lightweight integrated development environment for creating, compiling, and executing Java applications and applets.
Java Tools includes point and click access to the Java files, commands, and documents. It also includes a built-in text editor and user interface for the Java debugger.
It is intended for the new Java user who needs help getting started. Its also for the more experienced Java user who wants easy access to the Java commands and a text editor.
Main features:
- GUI with built-in help and small footprint.
- Point and click access to all files (Java, manifest, HTML, image and sound) and directories (package).
- Point and click access to all commands for compiling (javac), archiving (jar), documenting (javadoc), executing (java), debugging (jdb) and disassembling (javap).
- Point and click access to all documents (Java API Specification, Java Tools and Utilities, Java Features and Java Tutorial).
- Point and click creation of all files (Java, manifest and HTML) and directories (package).
- Point and click installation of distribution archive files (Java document, Java source code, Java Tutorial and Sun Tools).
- Automatic determination of class file dependencies for archiving (jar) and documenting (javadoc) Java files.
- Checking for unused, redundant and missing imports.
- Logging of all commands invoked by GUI.
- Code metrics for Java files.
- Built-in text editor (see Edit for details).
- Built-in user interface for the Java debugger with command-line editing and history.
- Self-installing executable (Java archive file).
- Comprehensive installation and user documentation for Java and Java Tools.
<<lessJava Tools includes point and click access to the Java files, commands, and documents. It also includes a built-in text editor and user interface for the Java debugger.
It is intended for the new Java user who needs help getting started. Its also for the more experienced Java user who wants easy access to the Java commands and a text editor.
Main features:
- GUI with built-in help and small footprint.
- Point and click access to all files (Java, manifest, HTML, image and sound) and directories (package).
- Point and click access to all commands for compiling (javac), archiving (jar), documenting (javadoc), executing (java), debugging (jdb) and disassembling (javap).
- Point and click access to all documents (Java API Specification, Java Tools and Utilities, Java Features and Java Tutorial).
- Point and click creation of all files (Java, manifest and HTML) and directories (package).
- Point and click installation of distribution archive files (Java document, Java source code, Java Tutorial and Sun Tools).
- Automatic determination of class file dependencies for archiving (jar) and documenting (javadoc) Java files.
- Checking for unused, redundant and missing imports.
- Logging of all commands invoked by GUI.
- Code metrics for Java files.
- Built-in text editor (see Edit for details).
- Built-in user interface for the Java debugger with command-line editing and history.
- Self-installing executable (Java archive file).
- Comprehensive installation and user documentation for Java and Java Tools.
Download (0.15MB)
Added: 2007-07-09 License: Freeware Price:
838 downloads
Java Tetris 1.0
Java Tetris project is a simple Tetris game. more>>
Java Tetris project is a simple Tetris game.
Java Tetris is a game written with Eclipse and the VE Plugin. It is a nice starting point if you want to learn Java and Eclipse.
The game can be started as Java applet or Java application.
Enhancements:
- The dependency on jdom was removed.
- The jar is now only 30kb.
- A bug was fixed in the score list.
<<lessJava Tetris is a game written with Eclipse and the VE Plugin. It is a nice starting point if you want to learn Java and Eclipse.
The game can be started as Java applet or Java application.
Enhancements:
- The dependency on jdom was removed.
- The jar is now only 30kb.
- A bug was fixed in the score list.
Download (0.12MB)
Added: 2007-05-25 License: GPL (GNU General Public License) Price:
961 downloads
Scriptol to Php Compiler
Scriptol to Php Compiler is a scriptol program that may be interpreted by the Php interpreter. more>>
Scriptol to Php Compiler is a scriptol program that may be interpreted by the Php interpreter and it may be also compiled either to C++ or directly as an executable.
The Php interpreter is required by solp (download it at www.php.net or get it on the Scriptol CD).
Installation:
It is better to install Scriptol at root of a disk, for example:
/home/user/scriptolp
Once the archive is extracted into the scriptolp directory, you have just to go to this directory from the console to run the compiler.
To use the compiler at command line from any directory, you have to put the compilers into the path, in the usr directory for exemple, or any directory assigned to the path variable (see .bashrc or equivalent). You may also add the scriptol directory to list of paths. Before to use the compiler, you have to read the licence, in the doc directory: licence.html.
Usage:
Type the source of your program in a text editor and save it as mysource.sol or any other name with the sol extension.
Then just type:
./solp mysource
To know the compilers options, type solp without argument, at command line.
Examples:
Type from the main scriptol directory:
./solp demos/helloyou
<<lessThe Php interpreter is required by solp (download it at www.php.net or get it on the Scriptol CD).
Installation:
It is better to install Scriptol at root of a disk, for example:
/home/user/scriptolp
Once the archive is extracted into the scriptolp directory, you have just to go to this directory from the console to run the compiler.
To use the compiler at command line from any directory, you have to put the compilers into the path, in the usr directory for exemple, or any directory assigned to the path variable (see .bashrc or equivalent). You may also add the scriptol directory to list of paths. Before to use the compiler, you have to read the licence, in the doc directory: licence.html.
Usage:
Type the source of your program in a text editor and save it as mysource.sol or any other name with the sol extension.
Then just type:
./solp mysource
To know the compilers options, type solp without argument, at command line.
Examples:
Type from the main scriptol directory:
./solp demos/helloyou
Download (0.29MB)
Added: 2005-12-02 License: Freeware Price:
1421 downloads
Java for C++ 0.4
Java for C++ is a tool to generate C++-wrapper-classes for existing Java-classes. more>>
Java for C++ is a tool to generate C++-wrapper-classes for existing Java-classes. This tool reads a list of Java class names and creates source code for C++-classes to wrap them.
The implementation of the wrapper classes uses JNI (Java Native Interface) to call the "real" Java classes.
The C++-API to use these wrapper classes is very close to the API of the original Java classes. So developers of C++-software can use Java-classes as if they have been implemented in C++.
Enhancements:
- A problem where null values for method arguments, method return values, or field values caused some generated code to crash was fixed.
- Updating is strongly encouraged.
<<lessThe implementation of the wrapper classes uses JNI (Java Native Interface) to call the "real" Java classes.
The C++-API to use these wrapper classes is very close to the API of the original Java classes. So developers of C++-software can use Java-classes as if they have been implemented in C++.
Enhancements:
- A problem where null values for method arguments, method return values, or field values caused some generated code to crash was fixed.
- Updating is strongly encouraged.
Download (0.043MB)
Added: 2005-12-22 License: GPL (GNU General Public License) Price:
1404 downloads
cid-compiler 0.1
cid-compiler is a language tool to easily create C code with object oriented features. more>>
cid-compiler is a language tool to easily create C code with object oriented features. Its compiler generates header (.h) files and implementations (.c) from a specification file (.i).
The generated C code consists of a struct, a opaque pointer to it (in the header file) and rewritten functions. The defined functions will get prefixed with the class name, they will also get a new first argument that is a pointer to the newly defined struct.
Functions that do not have a return value are considered constructors and will not get a new 1st argument but will automatically get a return value of pointer to the struct. The place between @class "name" and @attributes is e. g. for include statements and will make it into the header file.
To ease renaming the class, you can use the define CLASS, which will always be a define to a pointer of the new struct type.
Interface example
@class cstring
#include < stdio.h >
#include < string.h >
@attributes
char *c;
@methods
new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int length() {
return strlen(this->c);
}
@end
will yield a cstring.h file:
#ifndef _CSTRING_H_
#define _CSTRING_H_
#include < stdio.h >
#include < string.h >
typedef struct cstring *cstring;
cstring cstring_new(char *n);
int cstring_length(cstring this);
#endif
and a cstring.c file:
#include "cstring.h"
#define CLASS cstring
#define NEWCLASS malloc(sizeof(struct cstring));
#define NEWCLASS_M malloc(sizeof(struct cstring));
#define NEWCLASS_C calloc(1,sizeof(struct cstring));
struct cstring {
char *c;
};
cstring cstring_new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int cstring_length(cstring this) {
return strlen(this->c);
}
Issues:
The current compiler (v0.1) will reject quite some valid C code. Also the given error is not very helpful;
<<lessThe generated C code consists of a struct, a opaque pointer to it (in the header file) and rewritten functions. The defined functions will get prefixed with the class name, they will also get a new first argument that is a pointer to the newly defined struct.
Functions that do not have a return value are considered constructors and will not get a new 1st argument but will automatically get a return value of pointer to the struct. The place between @class "name" and @attributes is e. g. for include statements and will make it into the header file.
To ease renaming the class, you can use the define CLASS, which will always be a define to a pointer of the new struct type.
Interface example
@class cstring
#include < stdio.h >
#include < string.h >
@attributes
char *c;
@methods
new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int length() {
return strlen(this->c);
}
@end
will yield a cstring.h file:
#ifndef _CSTRING_H_
#define _CSTRING_H_
#include < stdio.h >
#include < string.h >
typedef struct cstring *cstring;
cstring cstring_new(char *n);
int cstring_length(cstring this);
#endif
and a cstring.c file:
#include "cstring.h"
#define CLASS cstring
#define NEWCLASS malloc(sizeof(struct cstring));
#define NEWCLASS_M malloc(sizeof(struct cstring));
#define NEWCLASS_C calloc(1,sizeof(struct cstring));
struct cstring {
char *c;
};
cstring cstring_new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int cstring_length(cstring this) {
return strlen(this->c);
}
Issues:
The current compiler (v0.1) will reject quite some valid C code. Also the given error is not very helpful;
Download (0.098MB)
Added: 2006-03-07 License: BSD License Price:
1327 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above java aot compiler search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed