{"id":60388,"library":"pegtl","title":"PEGTL","description":"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)","status":"active","version":"3.2.8","language":"cpp","source_language":null,"source_url":null,"tags":["parser","peg","header-only","template","grammar"],"install":[{"cmd":"vcpkg install pegtl","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(pegtl CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE taocpp::pegtl)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"pegtl/pegtl.hh","correct":"#include <pegtl/pegtl.hh>"}],"quickstart":{"code":"#include <pegtl/pegtl.hh>\n#include <iostream>\n\nstruct grammar : pegtl::string<'h','e','l','l','o'> {};\n\nint main() {\n    pegtl::string_input in(\"hello\", \"test\");\n    if (pegtl::parse<grammar>(in)) {\n        std::cout << \"Parsed 'hello'\" << std::endl;\n    }\n    return 0;\n}","lang":"cpp","description":"Parses the string 'hello' using a simple PEGTL grammar"},"warnings":[{"fix":"Include the header directly; ensure C++17 or later for best performance","message":"Header-only library; no linking required but may increase compile times","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'accord':24 'c':14 'combin':19 'creat':22 'depend':13 'express':4,28 'grammar':5,29,37 'header':16,34 'header-on':15,33 'librari':7,20 'pars':3,27 'parser':18,23,31 'peg':30,32 'pegtl':1,8 'templat':6,36 'zero':12 'zero-depend':11","created_at":"2026-06-16T19:28:40.246555+00:00","updated_at":"2026-06-16T19:28:40.246555+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}