diff options
author | John Millaway <john43@users.sourceforge.net> | 2006-03-22 20:03:43 +0000 |
---|---|---|
committer | John Millaway <john43@users.sourceforge.net> | 2006-03-22 20:03:43 +0000 |
commit | e620bfb4703d82b4a1a38f6f2a0b5a083b54fe04 (patch) | |
tree | 4545d9963ba56eb429ea251f16ec303c5af4da23 /doc/flex.texi | |
parent | 68a3b55eb3b423cae377c0a25db8ff30ec8bd02d (diff) |
Documented set difference operator {-}.
Diffstat (limited to 'doc/flex.texi')
-rw-r--r-- | doc/flex.texi | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/flex.texi b/doc/flex.texi index c43d3ee..1296721 100644 --- a/doc/flex.texi +++ b/doc/flex.texi @@ -693,6 +693,9 @@ character EXCEPT an uppercase letter. any character EXCEPT an uppercase letter or a newline +@item [a-z]{-}[aeiou] +the lowercase consonants + @item r* zero or more r's, where r is any regular expression @@ -947,6 +950,16 @@ Flex will issue a warning if the expressions @samp{[:^upper:]} and unclear. The current behavior is to skip them entirely, but this may change without notice in future revisions of flex. +@item + +The @samp{@{-@}} operator computes the difference of two character classes. For +example, @samp{[a-c]@{-@}[b-z]} represents all the characters in the class +@samp{[a-c]} that are not in the class @samp{[b-z]} (which in this case, is +just the single character @samp{a}). The @samp{@{-@}} operator is left +associative, so @samp{[abc]@{-@}[b]@{-@}[c]} is the same as @samp{[a]}. Be careful +not to accidently create an empty set, which will never match. + + @cindex trailing context, limits of @cindex ^ as non-special character in patterns @cindex $ as normal character in patterns |