yhirose / cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library
MIT License
880 stars 112 forks source link

Add insensitive case character class #220

Closed mingodad closed 2 years ago

mingodad commented 2 years ago

Would be nice to have character class case insensitive [a-z]i for grammars where identifiers are case insensitive (SQL, Pascal, ...).

Here is an example on peggy playground https://peggyjs.org/online.html (also implemented here https://github.com/mingodad/peg):

start = name_char+ 
name_char =
     [a-z0-9$_]i* [ \t\n]

Input:

one
Two
One