Skip to content

coderguang/csgl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csgl

now you can get more effective generated code tool by project miniGameEngine

  • a tools for generated code by flex and bison
  • it only run in linux. centos7.0 bison (GNU Bison) 2.7 flex 2.5.37
  • it can identify enum,struct,interface and generated serialize for csglib

how to start

  1. complie it,it use clang for complie
   make
  1. if make error,check if bison or flex install or not.
  2. start generated code
    format is ./csgl inputfileDir outputfileDir inputfileName
  test -d generateCode||mkdir generateCode
  ./csgl ./ generateCode/ Test
  1. and then,your can find the generated code in generateCode dir.
    if success,you will get below output.
  [root@VM_38_103_centos csgl]# ./csgl ./ generateCode/ Test            
  input file is ./Test.csgl
  output dir is generateCode/
  output headfile is generateCode/Test.h
  output cppfile is generateCode/Test.cpp
  start generated head file Test.csgl
  start generated cpp file Test.csgl
  build csgl file success!

and generator code in generateCode.this code is use for csglib