kschiess / parslet

A small PEG based parser library. See the Hacking page in the Wiki as well.
kschiess.github.com/parslet
MIT License
809 stars 95 forks source link

introduce case-insensitive version of str and match atoms #226

Open taichi-ishitani opened 1 year ago

taichi-ishitani commented 1 year ago

There are some cases that str and match atoms would be case-insensitve. For exmaple, parsing hexadecimal number:

(str('0x') | str('0X') >> hex_digit.repeat(1)

I think case-insensitive version of these atoms are convenience for this kind of case. This PR is to introduce these atoms named istr and imatch.