2016-03-18 21:22:42 +08:00
# C++ target for ANTLR 4
2016-05-01 18:41:32 +08:00
This folder contains the C++ runtime support for ANTLR. See [the canonical antlr4 repository ](https://github.com/antlr/antlr4 ) for in depth detail about how to use ANTLR 4.
2016-03-18 21:22:42 +08:00
## Authors and major contributors
ANTLR 4 is the result of substantial effort of the following people:
* [Terence Parr ](http://www.cs.usfca.edu/~parrt/ ), parrt@cs.usfca.edu
ANTLR project lead and supreme dictator for life
[University of San Francisco ](http://www.usfca.edu/ )
* [Sam Harwell ](http://tunnelvisionlabs.com/ )
Tool co-author, Java and C# target)
The C++ target has been the work of the following people:
* Dan McLaughlin, dan.mclaughlin@gmail.com C++ Target project leader
* David Sisson, dsisson@google.com
* [Mike Lischke ](www.soft-gems.net ), mike@lischke-online.de
2016-05-09 21:06:02 +08:00
## Other contributors
2016-05-09 20:09:00 +08:00
* Marcin Szalowicz, mszalowicz@mailplus.pl (cmake build setup)
2016-03-18 21:22:42 +08:00
2016-05-09 21:06:02 +08:00
## Project Status
2016-03-18 21:22:42 +08:00
2016-05-16 00:37:56 +08:00
* Building on OS X, Windows, and Linux
2016-03-18 21:22:42 +08:00
* No errors and warnings
* Library linking
2016-05-14 00:19:12 +08:00
* Some unit tests in the OSX project, for important base classes with almost 100% code coverage.
2016-04-21 23:57:33 +08:00
* All memory allocations checked
2016-05-14 00:19:12 +08:00
* Simple command line demo application working on all supported platforms.
2016-03-18 21:22:42 +08:00
2016-05-16 00:37:56 +08:00
### Build + Usage Notes
2016-05-14 00:19:12 +08:00
The minimum C++ version to compile the ANTLR C++ runtime with is C++11. The supplied projects can built the runtime either as static or dynamic library, as both 32bit and 64bit arch. The OSX project contains a target for iOS and can also be built using cmake (instead of XCode).
2016-05-16 00:37:56 +08:00
Include the antlr4-runtime.h umbrella header in your target application to get everything needed to use the library.
2016-05-22 17:18:16 +08:00
#### Compiling on Windows
Simply open the VS solution (VS 2013+) and build it.
#### Compiling on OSX
Either open the included XCode project and build that or use the cmake compilation as described for linux.
#### Compiling on Linux
2016-05-23 15:40:48 +08:00
- cd < antlr4-dir > /runtime/Cpp (this is where this readme is located)
2016-05-22 17:18:16 +08:00
- mkdir build && mkdir run && cd build
- cmake ..-DANTLR_JAR_LOCATION=full/path/to/antlr4-4.5.4-SNAPSHOT.jar -DWITH_DEMO=True
- make
- DESTDIR=< antlr4-dir > /runtime/Cpp/run make install
2016-05-23 15:40:48 +08:00
If you don't want to build the demo then simply run cmake without parameters.