cpp-peglib VS scnlib

Compare cpp-peglib vs scnlib and see what are their differences.

cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library (by yhirose)

scnlib

scanf for modern C++ (by eliaskosunen)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
cpp-peglib scnlib
4 18
799 920
- -
6.2 9.4
2 months ago 8 days ago
C++ C++
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

cpp-peglib

Posts with mentions or reviews of cpp-peglib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-12.

scnlib

Posts with mentions or reviews of scnlib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-07.
  • Why are strings and IO so complicated?
    13 projects | /r/cpp | 7 Dec 2023
    scnlib (https://github.com/eliaskosunen/scnlib) scanf
  • Reddit++
    2 projects | /r/cpp | 28 Mar 2023
  • CPM.cmake to make CMake's FetchContent easier
    4 projects | dev.to | 28 Dec 2022
    include(FetchContent) FetchContent_Declare( Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_TAG v3.0.0-preview4 ) FetchContent_Declare( fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_TAG 9.1.0 ) FetchContent_Declare( scnlib GIT_REPOSITORY https://github.com/eliaskosunen/scnlib.git GIT_TAG v1.1.2 ) FetchContent_MakeAvailable(Catch2 fmt scnlib)
  • [C++20] ClearIO library (unfinished)
    5 projects | /r/cpp | 10 Dec 2022
    Yeah, but parsing format strings in runtime induces an overhead, and doing it in compile time is not trivial, and Iā€™m not sure ClearIO is worth the trouble, since it turns out scnlib exists.
    5 projects | /r/cpp | 10 Dec 2022
  • My AoC2021 solutions in C++
    2 projects | /r/adventofcode | 15 Oct 2022
    The code is rather nice (in my biased opinion) and makes heavy use of a couple of libraries like scnlib and [Eigen](eigen.tuxfamily.org/). Some things could probably be more optimized but I mainly focused on conciseness. I hope this is useful and I can explain my thought process further if you have any questions.
  • what annoys you most while using c++?
    5 projects | /r/cpp | 28 Aug 2022
    I've found https://github.com/eliaskosunen/scnlib but haven't tested it. Maybe that suits your needs for 2.
  • The Year is 2022 and the Standard is C++20; what is your preferred way to do Text I/O?
    3 projects | /r/cpp | 25 Apr 2022
    I had a user enum like enum class Color {Red, Green, Blue}; that I wanted to add serialization support for. Following the docs (https://scnlib.readthedocs.io/), after some tweaks I arrived at the following:
  • scnlib (scanf for modern C++) - version 1.0 released
    2 projects | /r/cpp | 28 Feb 2022
    Thanks for the comment, I made an issue tracking this: https://github.com/eliaskosunen/scnlib/issues/51
    2 projects | /r/cpp | 28 Feb 2022

What are some alternatives?

When comparing cpp-peglib and scnlib you can also consider the following projects:

PEGTL - Parsing Expression Grammar Template Library

ctpg - Compile Time Parser Generator is a C++ single header library which takes a language description as a C++ code and turns it into a LR1 table parser with a deterministic finite automaton lexical analyzer, all in compile time.

C++ Format - A modern formatting library

gainput - Cross-platform C++ input library supporting gamepads, keyboard, mouse, touch

filter_spirit - Advanced item filter generator for Path of Exile that uses it's own DSL and online item price APIs

flex - The Fast Lexical Analyzer - scanner generator for lexing in C and C++

aoc2021 - Advent of Code 2021

tinyformat - Minimal, type safe printf replacement library for C++

scope_guard - A modern C++ scope guard that is easy to use but hard to misuse.

AoC-2022 - Advent of code 2022

Better Enums - C++ compile-time enum to string, iteration, in a single header file

AnyAny - C++17 library for comfortable and efficient dynamic polymorphism