lawrancej / CompilerKit

Compiler construction library in C.
GNU Lesser General Public License v2.1
55 stars 33 forks source link

Nice to have pre-defined character classes #41

Closed lawrancej closed 12 years ago

lawrancej commented 12 years ago

It'd be nice to have convenience functions to produce the following character classes. Don't create separate classes for these, just use the character class definition (or compilerkit_alternation) from issue #27. Each of these will probably be one-liner functions inside src/convenience.c.

/** Return a character class corresponding to [0-9] */
GObject *compilerkit_regex_digits(void);
/** Return a character class corresponding to [a-z] */
GObject *compilerkit_regex_lower(void);
/** Return a character class corresponding to [A-Z] */
GObject *compilerkit_regex_upper(void);
/** Return a character class corresponding to all punctuation */
GObject *compilerkit_regex_punct(void);
/** Return a character class corresponding to all whitespace */
GObject *compilerkit_regex_whitespace(void);
theCompanyDream commented 12 years ago

I can do this

lawrancej commented 12 years ago

I added in stubs for you.

theCompanyDream commented 12 years ago

issue complete