Coder Social home page Coder Social logo

thinkcn / phpbot Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 97 KB

PHP code generator, which currently includes the ability to generate Getter and Setter

License: BSD 2-Clause "Simplified" License

C++ 98.61% CMake 1.28% PHP 0.11%
php getter-and-setter

phpbot's Introduction

PHPBot

PHP code generator, which currently includes the ability to generate Getter and Setter

Building PHPBot

  1. Prepare Antlr4 jar
curl -O https://www.antlr.org/download/antlr-4.7.1-complete.jar
  1. Install Antlr Cpp Runtime
svn co https://github.com/antlr/antlr4/trunk/runtime/Cpp cppruntime
cd cppruntime
mkdir build && mkdir run && cd build
# TODO: Please note to modify to your own path. 
alias antlr-4='java -Xmx500M -cp "/path/to/antlr-4.7.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
cmake .. -DANTLR_JAR_LOCATION=/path/to/antlr-4.7.1-complete.jar -DWITH_DEMO=True
make
# TODO: modify to your own path.
DESTDIR=/antlrcpp/runtime/path/inatall/path/ make install
  1. Build
git clone https://github.com/thinkcn/PHPBot.git
cd PHPBot
# modify 'ANTLR_CPP_RUNTIME_DST' of CMakeLists.txt 
mkdir build
cd build
cmake ..
make

Test

# Generate Getter
./phpbot ../tests/test.php -g
# Generate Setter
./phpbot ../tests/test.php -s
# Both
./phpbot ../tests/test.php -gs
# Help
./phpbot ../tests/test.php -h

Others

  • Tested to pass on WSL and MacOS

phpbot's People

Contributors

coleflowers avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.