9 projects tagged "Parser"
The Lean Mean C++ Option Parser handles program arguments (argc, argv). It supports the short and long option formats of getopt(), getopt_long(), and getopt_long_only(), but has a more convenient interface. It is a freestanding, header-only library with no dependencies, not even libc or STL. It comes with a usage message formatter which supports column alignment and line wrapping, making it ideal for localized messages with different lengths.
Flexc++ is a tool for generating scanners based on regular expressions. Flexc++ is highly comparable to the programs flex and flex++. The goal was to create a similar program, but to implement it completely in C++. Most flex and flex++ grammars should be usable with flexc++ with minor adjustments.
The Parsing Expression Grammar Template Library (PEGTL) is a C++0x library for creating parsers according to a Parsing Expression Grammar (PEG). Grammars are embedded as regular C++ code, created with template programming (not template meta programming). These hierarchies naturally correspond to the inductive definition of PEGs. The library extends on the subject of PEGs with new expression types, actions that can be attached to grammar rules, and mechanisms to ensure helpful diagnostics in case of parsing errors. PEGs are superficially similar to Context-Free Grammars (CFGs).
Ell is a library to write EBNF grammars as C++ code for quick development of LL(n) parsers or similar applications. It is not a tool to generate parsers (like ANTLR): the grammar you write is directly embedded into your C++ code. The core library is very light (less than 2000 lines of headers) and written in generation templates to achieve the fastest execution. The service provided by Ell is very similar to what Boost Spirit provides, but with a simpler object model, and without the need of the Boost library (it only depends on STL).