Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.546.649 Times

GNU Gengen 1.1

  Date Added: July 27, 2010  |  Visits: 716

GNU Gengen

Report Broken Link
Printer Friendly Version

Product Homepage
Download (75 downloads)

GNU Gengen (GENerator GENerator) is a tool that, starting from a parameterized text, called template, generates a text generator that can substitute parameters with values. At the moment Gengen can generate C++ or C code; however other target languages are under development (e.g., Java). This project is free software; you are free to use, share and modify it under the terms of the GNU General Public License. Simple example Say you are writing a C/C++ program and at some point your program has to generate the following code: if (i < 10) printf("the value of i is %d", i); It is not so difficult to write this piece of C++ code: cout << "if (i < 10)" << endl; cout << " printf("the value of i is %d", i);" << endl; or the C code: printf("if (i < 10)n"); printf(" printf("the value of i is %%d", i);n"); provided that you remember to escape the " (and in the C code, also the %). Suppose now that the previous piece of code has to be generated many times by your program, and every time instead of i another symbol has to be generated (decided at run time). In this case, supposing that this value is contained in a variable symb, the code for generating this code would be a little bit more complex: cout << "if (" << symb << "< 10)" << endl; cout << " printf("the value of " << symb << " is %d", " << symb << ");" << endl; And the C version would be even more obfuscated. Probably you didnt even realize that you forgot to leave a space before the < 10; basically this is due to the fact that this piece of code mixes the code that has to be generated with the code that generates it, and this tends to make this part of program less easy to maintain. Especially if some day you have to change the code that has to be generated, youll have to act on this part of the program, and probably youll have to execute some tests in order to be sure that you did it right. If the code that you have to generate is a slightly more complex, the task may easily become a pain in the neck! Wouldnt it be nice if you could write the code to be generated in a separate file, lets call it template, say test1.cc_skel this way if (@i@ < 10) printf("the value of @i@ is %d", @i@); and have a tool that generates a generator, that you can instantiate at run-time with the value that has to be substituted to the parameter i? If such a tool existed, and it generated a file test1_c.h with a C struct test1_gen_struct, then you could write simply this code, in another file, say test1_gen_c.c: #include < stdio.h > #include "test1_c.h" int main() { struct test1_gen_struct gen_struct; gen_struct.i = "foo"; generate_test1(stdout, ≥n_struct, 0); printf("n"); gen_struct.i = "bar"; generate_test1(stdout, ≥n_struct, 0); printf("n"); return 0; } Alternatively, if it generated a file test1.h with a C++ class test1_gen_class, then you could write simply this code, in another file, say #include < iostream > using std::cout; using std::endl; #include "test1.h" int main() { test1_gen_class gen_class; gen_class.set_i("foo"); gen_class.generate_test1(cout); cout << endl; gen_class.set_i("bar"); gen_class.generate_test1(cout); cout << endl; return 0; } and when you run it you would obtain the expected output: if (foo < 10) printf("the value of foo is %d", foo); if (bar < 10) printf("the value of bar is %d", bar); Whats New in This Release: - The file cmdline.ggo is now distributed in the tarball, since its absence might make the compilation fail..

Requirements: No special requirements
Platforms: Linux
Keyword: Called Code Generators Generator Generator Generator Gengen Gnu Gnu Gengen Parameterized Programming Starting Text Tool
Users rating: 0/10

License: Freeware Size: 327.68 KB
More Reviews or Write Review

Text Editors  -  GNU TeXmacs
GNU TeXmacs is a free scientific text editor, which was both inspired by TeX and GNU Emacs. The editor allows you to write structured documents via a wysiwyg (what-you-see-is-what-you-get) and user friendly interface. New styles may be created...
5 MB  
Audio Tools  -  Tone Generator for Mac OS 2.14
A sine wave generator, frequency generator and signal generator that lets you create audio test tones, sweeps or noise waveforms using your Mac OS X. Features: - Generate sine wave, square wave, triangular waveform, saw tooth waveform, impulse,...
542.72 KB  
Programming  -  JCommando 1.2
A Java command-line option parser generator, providing function similar to GNU Getopt, but much richer.
83.14 KB  
Code Management Tools  -  Cocom 0.995
Cocom project is a toolset that is oriented towards the creation of compilers, cross-compilers, interpreters, and other language processors. It consists of reusable packages (collection and memory management framework), a Sprut internal...
3 MB  
Utilities  -  Qr Blaster QR Code Scanner Reader 1.0
Qr Blaster is the leading provider of free custom made QR Code generators. Now you can get the simple QR Code scanner that scans and reads QR Codes and delivers the location. Also stores history of the QR Codes so you can refer to them later....
1.6 MB  
Utilities  -  pyFLTK 0.4
JNI++ is a set of two code generating utilities and a core C++ library that simplify programming to the Java Native Interface (JNI) with C++. The first of these utilities is used to generate C++ "proxy" classes given a Java class or interface, and...
1.38 MB  
Development Editors  -  Universal Code Lines Counter 1.1.4
A fast and easy tool for counting source code, blank and comment lines of software projects for many programming/script languages. With this application you get a detailed report (as table and additionally as graphic) about the source code of...
3.88 MB  
Programming  -  Codejen Framework 1.0
A flexible code generation framework providing the infrastructure for developers to build their own code generators.
18.42 KB  
Programming  -  Framecode 0.0.3
Framecode is a framework, written in Java, to build code generators for all languages. It provides a set of classes to build and format code in a better way than writer.write(mystring). At this time only Java is supported.
44.68 KB  
Productivity  -  Code Compiler WP8
Code Compiler is an online compiler and lets you compile and run your programming scripts written in most of the popular modern programming languages. The tool supports languages such as C, C++, C++11, Clojure, C#, Java, JavaScript, Haskell, Perl,...
2 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Code Management Tools  -  BitNami Review Board Stack 1.6.9-1 (linux)
Review Board is a powerful web-based code review tool that offers developers an easy way to handle code reviews. It scales well from small projects to large companies and offers a variety of tools to take much of the stress and time out of the...
75.97 MB  
Code Management Tools  -  Common Text Transformation Library 2.08
Common Text Transformation Library, CTTL for short, is a set of C++ classes and functions to understand and modify text data. Common Text Transformation Library implementation is based on STL classes and algorithms. Concept of a substring plays...
163.84 KB  
Code Management Tools  -  GMP compiler 1.0.0
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...
276.48 KB  
Code Management Tools  -  phpCodeGenie 3.0.2
phpCodeGenie (PCG) is a code generator for database driven applications. PCG can generate entire working basic database driven applications for you. PCG can generate code from different databases. The database servers it can talk to via ADODB...
1.4 MB  
Code Management Tools  -  idioskopos 0.4.1
idioskopos (Greek: idio- inward, within, private; -skopos look, aim, target) is a C++ library that simplifies (hopefully) the addition of object reflection and introspection. There are numerous libraries that provide object introspection, but...
604.16 KB