资 源 简 介
Please visit the new PEGTL page on GitHub
Abstract
The Parsing Expression Grammar Template Library (PEGTL) is a C++11 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), i.e. nested template instantiations that naturally correspond to the inductive definition of PEGs.
Included is a comprehensive set of parser (combinator) rules that can be extended by the user, and hooks for debugging grammars and attaching user-defined actions to grammar rules.
PEGs are superficially similar to Context-Free Grammars (CFGs); for an in-depth description see Wikipedia page on PEGs or this paper on PEGs by Bryan Ford