The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). Grammars are written as regular C++ code, created with template programming (not template meta programming), i.e. nested template instantiations that naturally correspond to the inductive definition of PEGs (and other parser-combinator approaches).
peg header-only cpp parsing cpp17 cpp11 grammar parsing-expression-grammarsThis is a simple parser generator based on Parsing Expression Grammars. Please see the release notes for updates.
parsing-expression-grammars peg grammar parsing parser-generatorC++11 header-only PEG (Parsing Expression Grammars) library. cpp-peglib tries to provide more expressive parsing experience in a simple way. This library depends on only one header file. So, you can start using it right away just by including peglib.h in your project.
cpp cpp11 peg parsing-expression-grammarsSome basic parser combinators. Not as pretty as in a language that supports operator overloading but still pretty good. Looking at the example grammar and parsing some s-expressions with Grammar.parse is a pretty good way to get a handle on it. The example grammar demonstrates pretty much all the combinators and how to handle recursion with Parser.delay. Everything is documented below. Just plop combinators.ts in some convenient location and reference it with ///<reference path=...>. The entry point into the library is the Parser class which serves as the top of the hierarchy for the parsers and provides two entry points for creating the base parsers. The first entry point is Parser.m (m is for match) and the second one is Parser.delay. Parser.m takes a predicate function that tests a "character" in the input stream and Parser.delay takes a function that will generate a parser on demand at an appropriate point in the parsing process.
parsing parser-combinators typescript parsing-expression-grammarspeg and leg are tools for generating recursive-descent parsers: programs that perform pattern matching on text. They processes a Parsing Expression Grammar (PEG)[Ford 2004] to produce a program that recognises legal sentences of that grammar. peg processes PEGs written using the original syntax described by Ford.
parsing-expression-grammars peg parser-generator recursive-descent recursive-descent-parser
We have large collection of open source products. Follow the tags from
Tag Cloud >>
Open source products are scattered around the web. Please provide information
about the open source projects you own / you use.
Add Projects.