All Projects → flexferrum → autoprogrammer

flexferrum / autoprogrammer

Licence: MIT license
C++ to C++ code generation tool (enum2string conversion, serialization, reflection etc.)

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to autoprogrammer

clang-tool
Simple and powerful standalone project for clang-based tools using libtooling (e.g. refactoring, auto-completion, etc.)
Stars: ✭ 35 (-54.55%)
Mutual labels:  clang, libtooling
cxxd
C/C++ language server implemented on top of Clang frontend.
Stars: ✭ 145 (+88.31%)
Mutual labels:  clang, clang-frontend
mutator
mutator is an experimental suite of tools aimed at analysis and automation of C/C++ code development
Stars: ✭ 62 (-19.48%)
Mutual labels:  clang, libtooling
flextool
C++ compile-time programming (serialization, reflection, code modification, enum to string, better enum, enum to json, extend or parse language, etc.)
Stars: ✭ 32 (-58.44%)
Mutual labels:  clang, libtooling
MetaCG
MetaCG offers an annotated whole program call-graph tool for Clang/LLVM.
Stars: ✭ 21 (-72.73%)
Mutual labels:  clang
perses
Language-agnostic program reducer.
Stars: ✭ 57 (-25.97%)
Mutual labels:  clang
linux
Linux kernel source tree
Stars: ✭ 234 (+203.9%)
Mutual labels:  clang
ccsm
C Code Source Metrics - tool to gather simple metrics from C code
Stars: ✭ 31 (-59.74%)
Mutual labels:  clang
FrameOfReference
C++ library to pack and unpack vectors of integers having a small range of values using a technique called Frame of Reference
Stars: ✭ 36 (-53.25%)
Mutual labels:  clang
C-Cpp-Coverage-for-CLion
Get coverage data in CLion using gcov or llvm-cov
Stars: ✭ 37 (-51.95%)
Mutual labels:  clang
bazel-compile-commands-extractor
Goal: Enable awesome tooling for Bazel users of the C language family.
Stars: ✭ 295 (+283.12%)
Mutual labels:  clang
vuo
A realtime visual programming language for interactive media.
Stars: ✭ 103 (+33.77%)
Mutual labels:  clang
dumb-obfuscator
Tutorial on how to write the dumbest obfuscator I could think of.
Stars: ✭ 147 (+90.91%)
Mutual labels:  clang
clangbuilder
Building Clang ♡ Utility and Environment
Stars: ✭ 101 (+31.17%)
Mutual labels:  clang
Sundials.jl
Julia interface to Sundials, including a nonlinear solver (KINSOL), ODE's (CVODE and ARKODE), and DAE's (IDA) in a SciML scientific machine learning enabled manner
Stars: ✭ 167 (+116.88%)
Mutual labels:  clang
TON-Compiler
Clang compiler for Free TON Virtual Machine
Stars: ✭ 56 (-27.27%)
Mutual labels:  clang
dextool
Suite of C/C++ tooling built on LLVM/Clang
Stars: ✭ 81 (+5.19%)
Mutual labels:  clang
c-project-template
A C project template with Makefile, command line options parsing, unittest using cmocka and valgrind
Stars: ✭ 97 (+25.97%)
Mutual labels:  clang
flatorize
Generate fast implementations of mathematical expressions. Inclues a linear algebra library.
Stars: ✭ 18 (-76.62%)
Mutual labels:  clang
sycl
SYCL for Vitis: Experimental fusion of triSYCL with Intel SYCL oneAPI DPC++ up-streaming effort into Clang/LLVM
Stars: ✭ 80 (+3.9%)
Mutual labels:  clang

Build Status Join the chat at https://gitter.im/autoprogrammer/Lobby

C++ code generation tool

Welcome to Autoprogrammer, the C++ code generation tool! This tool helps you dramatically reduce the amount of boilerplate code in your C++ projects. Based on clang frontend, the 'autoprogrammer' parses your C++ source files and generates new set C++ sources. For instance, it generates enum-to-string converting functions for you. Instead of you.

Table of contents

Overview

Historically, C++ (as a language) has got a lack of compile or runtime introspection, reflection and code injection. In consequence, the easiest task (for example, enum to string conversion) can lead the strong headache. The main purpose of 'autoprogrammer' tool is to eliminate this problem. Completely eliminate. This tool can be integrated in the build toolchain and produce a lot of boring boilerplate source code based on hand-written sources. For instance, can generate enum-string-enum conversion function. Or serialization/deserialization procedures. Or ORM mapping. Or static reflection helpers. And so forth, and so on. Currently, tool supports the following type of generators:

TODO list of generators to support:

  • Serialization/deserialization for boost and llvm::yaml
  • SQLite ORM
  • Helper implementations for popular static reflection libs

How it works

Autoprogrammer is a clang-based tool. It uses clang frontend for source code analyzes and bunch of Jinja2-like templates for the destination files production. Actually, 'autoprogrammer' compiles your hand-written source code, reflects it to internal structures and then produces new set of C++ source code files via corresponded generator. In order to process input files correctly, the whole set of compile options and definitions (and include paths as well) should be specified in the autoprogrammer command line.

How to use

sudo docker run --rm -ti autoprogrammer fl-codegen --help

How to build and install

With preconfigured docker

sudo docker build --tag autoprogrammer .

Manually on Linux

Prerequirements:

Build

  • Clone this repository
  • Init and update all submodules (git submodule update --init --recursive)
  • Create the build directory (ex. mkdir .build-debug)
  • Run the CMake (cmake -DCMAKE_BUILD_TYPE=Debug ../)
  • Run the make (cmake --build . --target all)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].