ExpressGenGen an Express Code Generator Generator
- BOOST 1.57
BOOST_ROOTset to boost install(extracting is sufficent) path- LUA 5.3.0
LUA_ROOTset to<lua_extracted>\src, same path should also containliblua.a
wget http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.gz/download -O boost_1_57_0.tar.gz
tar xvf boost_1_57_0.tar.gz
export BOOST_ROOT=<extracted_dir>
# you need to build BOOST
# and the program_options library should be in $BOOST_ROOT/stage/lib
# if it is in a diffrerent name copy it and rename it.
wget http://www.lua.org/ftp/lua-5.3.0.tar.gz
tar xvf lua-5.3.0.tar.gz
export LUA_ROOT=<extracted_dir>/src
cd $LUA_ROOT
make generic- CMakeLists.txt - to use with cmake
mkdir build
cd build
cmake ..
make+----------------------+ +----------------------+
| | | |
| | | |
| Template | +--------------> | ExpressGenGen |
| | | |
| | | |
+----------------------+ +----------+-----------+
|
|
|
|
|
|
v
+----------+------------+
| |
| |
| Generated |
| Code |
| |
+-----------+-----------+
|
|
|
|
|
|
|
v
+-----------------------+ +------------+-----------+
| | | |
| | | |
| | | Compile & run |
| Result | <--------------+ or interpret |
| | | |
| | +------------------------+
+-----------------------+
- ExpressGenGen's binary is
xgengenorxgengen.exe - First get it built or use a prebuilt version
- ExpressGenGen uses
STDINandSTDOUTfor communication
- Note: All
*nixexamples should work on Windows with minor modifications - Note: All Windows examples should work on
*nixwith minor modifications - Real power of ExpressGenGen comes with PIPE
cat template.txt | xgengen python > gen.py
chmod a+x gen.py
./gen.py > output.txttype template.txt | xgengen.exe web > out.html
start out.htmlLua target is capable of running the generated code by itself
echo 'Hello ExpressGenGen using :=> "{$$_VERSION$$}"' | xgengen luaor
echo 'Hello ExpressGenGen using :=> "{$$_VERSION$$}"' | xgengen(default is lua)
cat ./samples/lang_bash_CMakeLists.txt | xgengen bash | bash -cat /samples/lang_python_Hello.txt | xgengen python | python