Skip to content
This repository has been archived by the owner on Jul 26, 2018. It is now read-only.

Parsing case-insensitive languages #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wqweto
Copy link

@wqweto wqweto commented Feb 5, 2017

This PR implements case-insensitive string literals and character classes both in the grammar definition (greg.g) and parser implementation (compile.c) which is a very useful feature for parsing case-insensitive languages like SQL. The PR implements hex escape sequences in literals and classes too.

  • grammar extended to understand i postfix modifier on string literals and character classes (e.g. "string"i or [a-z]i) the way PEG.js defines case-insensitive matching
  • grammar also extended to support hexadecimal escape sequences in string and character classes, e.g. "\x45" is parsed the same as "E" in strings and classes

- grammar extended to understand `i` postfix modifier on string literals
and character classes (e.g. "string"i or [a-z]i) the way PEG.js defines
case-insensitive matching.
- grammar also extended to support hexadecimal escape sequences in
string and character classes, e.g. "\x45" is parsed as "E"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant