File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 11# PHPBot
22PHP code generator, which currently includes the ability to generate Getter and Setter
3+
4+ ## Building PHPBot
5+
6+ 1 . Prepare Antlr4 jar
7+
8+ ``` bash
9+ curl -O https://www.antlr.org/download/antlr-4.7.1-complete.jar
10+ ```
11+
12+ 2 . Install Antlr Cpp Runtime
13+
14+ ``` bash
15+ svn co https://github.com/antlr/antlr4/trunk/runtime/Cpp cppruntime
16+ cd cppruntime
17+ mkdir build && mkdir run && cd build
18+ # TODO: Please note to modify to your own path.
19+ alias antlr-4=' java -Xmx500M -cp "/path/to/antlr-4.7.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
20+ cmake .. -DANTLR_JAR_LOCATION=/path/to/antlr-4.7.1-complete.jar -DWITH_DEMO=True
21+ make
22+ # TODO: modify to your own path.
23+ DESTDIR=/antlrcpp/runtime/path/inatall/path/ make install
24+ ```
25+
26+ 3 . Build
27+
28+ ``` bash
29+ git pull https://github.com/thinkcn/PHPBot.git
30+ cd PHPBot
31+ # modify 'ANTLR_CPP_RUNTIME_DST' of CMakeLists.txt
32+ mkdir build
33+ cd build
34+ cmake ..
35+ make
36+ ```
37+
38+ ## Test
39+
40+ ``` bash
41+ # Generate Getter
42+ ./phpbot ../tests/test.php -g
43+ # Generate Setter
44+ ./phpbot ../tests/test.php -s
45+ # Both
46+ ./phpbot ../tests/test.php -gs
47+ # Help
48+ ./phpbot ../tests/test.php -h
49+ ```
You can’t perform that action at this time.
0 commit comments