LLVM API Documentation

regcclass.h
Go to the documentation of this file.
00001 /*-
00002  * This code is derived from OpenBSD's libc/regex, original license follows:
00003  *
00004  * This code is derived from OpenBSD's libc/regex, original license follows:
00005  *
00006  * Copyright (c) 1992, 1993, 1994 Henry Spencer.
00007  * Copyright (c) 1992, 1993, 1994
00008  *  The Regents of the University of California.  All rights reserved.
00009  *
00010  * This code is derived from software contributed to Berkeley by
00011  * Henry Spencer.
00012  *
00013  * Redistribution and use in source and binary forms, with or without
00014  * modification, are permitted provided that the following conditions
00015  * are met:
00016  * 1. Redistributions of source code must retain the above copyright
00017  *    notice, this list of conditions and the following disclaimer.
00018  * 2. Redistributions in binary form must reproduce the above copyright
00019  *    notice, this list of conditions and the following disclaimer in the
00020  *    documentation and/or other materials provided with the distribution.
00021  * 3. Neither the name of the University nor the names of its contributors
00022  *    may be used to endorse or promote products derived from this software
00023  *    without specific prior written permission.
00024  *
00025  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00026  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00028  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00029  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00030  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00031  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00032  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00033  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00034  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00035  * SUCH DAMAGE.
00036  *
00037  *  @(#)cclass.h  8.3 (Berkeley) 3/20/94
00038  */
00039 
00040 #ifndef LLVM_SUPPORT_REGCCLASS_H
00041 #define LLVM_SUPPORT_REGCCLASS_H
00042 
00043 /* character-class table */
00044 static struct cclass {
00045   const char *name;
00046   const char *chars;
00047   const char *multis;
00048 } cclasses[] = {
00049   { "alnum",  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
00050 0123456789",        ""} ,
00051   { "alpha",  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
00052           ""} ,
00053   { "blank",  " \t",    ""} ,
00054   { "cntrl",  "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
00055 \25\26\27\30\31\32\33\34\35\36\37\177", ""} ,
00056   { "digit",  "0123456789", ""} ,
00057   { "graph",  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
00058 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
00059           ""} ,
00060   { "lower",  "abcdefghijklmnopqrstuvwxyz",
00061           ""} ,
00062   { "print",  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
00063 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
00064           ""} ,
00065   { "punct",  "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
00066           ""} ,
00067   { "space",  "\t\n\v\f\r ",  ""} ,
00068   { "upper",  "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
00069           ""} ,
00070   { "xdigit", "0123456789ABCDEFabcdef",
00071           ""} ,
00072   { NULL,   0,    "" }
00073 };
00074 
00075 #endif