{"id":60786,"library":"pegtl-2","title":"PEGTL 2","description":"A C++11 header-only parser combinator library for creating parsers according to a Parsing Expression Grammar.","status":"active","version":"2.8.3","language":"cpp","source_language":null,"source_url":null,"tags":["header-only","parsing","peg","template"],"install":[{"cmd":"vcpkg install pegtl-2","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(pegtl_2 CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE pegtl::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 successfully\\n\";\n    }\n    return 0;\n}","lang":"cpp","description":"Parses the string 'hello' using a PEG grammar"},"warnings":[{"fix":"Consider using pegtl (version 3) for C++17 projects","message":"Version 2 is C++11 compatible but lacks features of PEGTL 3","severity":"gotcha","affected_versions":"2.x"}],"env_vars":null,"search_vec":"'+11':5 '2':2 'accord':15 'c':4 'combin':10 'creat':13 'express':19 'grammar':20 'header':7,22 'header-on':6,21 'librari':11 'pars':18,24 'parser':9,14 'peg':25 'pegtl':1 'templat':26","created_at":"2026-06-17T04:28:02.651675+00:00","updated_at":"2026-06-17T04:28:02.651675+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":["other"],"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}}