ctpg icon indicating copy to clipboard operation
ctpg copied to clipboard

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 analyze...

Results 11 ctpg issues
Sort by recently updated
recently updated
newest added

I want to convert between 2 similar formats (DokuWiki -> Obsidian). But I fail to describe a term "arbitrary text that is not matched by any terms, but surrounded by...

I am trying to split apart (and parameterize) my parser, something like this.. ```C++ template< auto ConvertToTypeConstantParameter, typename OperhandTypeParameterType, auto DataTypeNameParameterConstant, auto& LiteralRegexParameterConstant, // = defualt_constant_expression_literal_regex, auto& IdentifierRegexParameterConstant, // =...

Thanks for your work! I'm enjoying playing with the library. I found this handy fwiw: ``` struct sv_buffer { public: constexpr sv_buffer(std::string_view str) : str(str) {} constexpr sv_buffer(const char *str)...

Here is an example error message prior to this fix which I got using Clang 13.0.0 with `-std=c++20`: ``` /usr/local/include/ctpg/ctpg.hpp:187:25: error: use of overloaded operator '==' is ambiguous (with operand...

I'm currently facing an issue while using `ctpg::parser`: - `libstdc++` doesn't have a constexpr-ready version of `std::optional` - `libc++` doesn't have a constexpr-ready version of `std::vector` This makes `ctpg::parser` currently...

i.e. I want to use it much the way I use http://benhanson.net/lexertl.html (ignore all Unicode etc for now, see the Examples)

Possible to use precedence in pattern matching step? I have 3 terms on for digits ("[0-9]+"), "u" and one for identifiers "[a-zA-Z_][a-zA-Z_0-9]+" I "u" to identify an unsigned integer and...

CTRE is a dedicated Compile Time Regex library, as such it seems to have more regex features, and supports unicode, would it be possible to integrate it into CTPG?

I am writing a grammar using another parser library. i find lexer-scanner is unnatural. when we define a token , we usually give it a name with some semantics such...