[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/11] dfa: introduce contexts for the values in d->success
From: |
arnold |
Subject: |
Re: [PATCH 02/11] dfa: introduce contexts for the values in d->success |
Date: |
Wed, 4 Jan 2012 04:34:14 -0800 |
Hi.
> diff --git a/src/dfa.c b/src/dfa.c
> index 58505bf..2386f76 100644
> --- a/src/dfa.c
> +++ b/src/dfa.c
> @@ -91,6 +91,13 @@ typedef int charclass[CHARCLASS_INTS];
> errors that the cast doesn't. */
> static inline unsigned char to_uchar (char ch) { return ch; }
>
> +/* Contexts tell us whether a character is a newline or a word constituent.
> + Word-constituent characters are those that satisfy iswalnum(), plus '_'.
> */
> +
> +#define CTX_NONE 1
> +#define CTX_LETTER 2
> +#define CTX_NEWLINE 4
> +
Is there any reason, in this day and age, to still be using defines
instead of enums for something like this?
Thanks,
Arnold
- Re: [PATCH 02/11] dfa: introduce contexts for the values in d->success,
arnold <=