/3rd_party/llvm/lib/Support/regcname.h

https://code.google.com/p/softart/ · C++ Header · 139 lines · 101 code · 1 blank · 37 comment · 0 complexity · d138e3a26cb67ce3f323c97a79ec37d9 MD5 · raw file

  1. /*-
  2. * This code is derived from OpenBSD's libc/regex, original license follows:
  3. *
  4. * Copyright (c) 1992, 1993, 1994 Henry Spencer.
  5. * Copyright (c) 1992, 1993, 1994
  6. * The Regents of the University of California. All rights reserved.
  7. *
  8. * This code is derived from software contributed to Berkeley by
  9. * Henry Spencer.
  10. *
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions
  13. * are met:
  14. * 1. Redistributions of source code must retain the above copyright
  15. * notice, this list of conditions and the following disclaimer.
  16. * 2. Redistributions in binary form must reproduce the above copyright
  17. * notice, this list of conditions and the following disclaimer in the
  18. * documentation and/or other materials provided with the distribution.
  19. * 3. Neither the name of the University nor the names of its contributors
  20. * may be used to endorse or promote products derived from this software
  21. * without specific prior written permission.
  22. *
  23. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  24. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  25. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  26. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  27. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  28. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  29. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  30. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  31. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  32. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  33. * SUCH DAMAGE.
  34. *
  35. * @(#)cname.h 8.3 (Berkeley) 3/20/94
  36. */
  37. /* character-name table */
  38. static struct cname {
  39. const char *name;
  40. char code;
  41. } cnames[] = {
  42. { "NUL", '\0' },
  43. { "SOH", '\001' },
  44. { "STX", '\002' },
  45. { "ETX", '\003' },
  46. { "EOT", '\004' },
  47. { "ENQ", '\005' },
  48. { "ACK", '\006' },
  49. { "BEL", '\007' },
  50. { "alert", '\007' },
  51. { "BS", '\010' },
  52. { "backspace", '\b' },
  53. { "HT", '\011' },
  54. { "tab", '\t' },
  55. { "LF", '\012' },
  56. { "newline", '\n' },
  57. { "VT", '\013' },
  58. { "vertical-tab", '\v' },
  59. { "FF", '\014' },
  60. { "form-feed", '\f' },
  61. { "CR", '\015' },
  62. { "carriage-return", '\r' },
  63. { "SO", '\016' },
  64. { "SI", '\017' },
  65. { "DLE", '\020' },
  66. { "DC1", '\021' },
  67. { "DC2", '\022' },
  68. { "DC3", '\023' },
  69. { "DC4", '\024' },
  70. { "NAK", '\025' },
  71. { "SYN", '\026' },
  72. { "ETB", '\027' },
  73. { "CAN", '\030' },
  74. { "EM", '\031' },
  75. { "SUB", '\032' },
  76. { "ESC", '\033' },
  77. { "IS4", '\034' },
  78. { "FS", '\034' },
  79. { "IS3", '\035' },
  80. { "GS", '\035' },
  81. { "IS2", '\036' },
  82. { "RS", '\036' },
  83. { "IS1", '\037' },
  84. { "US", '\037' },
  85. { "space", ' ' },
  86. { "exclamation-mark", '!' },
  87. { "quotation-mark", '"' },
  88. { "number-sign", '#' },
  89. { "dollar-sign", '$' },
  90. { "percent-sign", '%' },
  91. { "ampersand", '&' },
  92. { "apostrophe", '\'' },
  93. { "left-parenthesis", '(' },
  94. { "right-parenthesis", ')' },
  95. { "asterisk", '*' },
  96. { "plus-sign", '+' },
  97. { "comma", ',' },
  98. { "hyphen", '-' },
  99. { "hyphen-minus", '-' },
  100. { "period", '.' },
  101. { "full-stop", '.' },
  102. { "slash", '/' },
  103. { "solidus", '/' },
  104. { "zero", '0' },
  105. { "one", '1' },
  106. { "two", '2' },
  107. { "three", '3' },
  108. { "four", '4' },
  109. { "five", '5' },
  110. { "six", '6' },
  111. { "seven", '7' },
  112. { "eight", '8' },
  113. { "nine", '9' },
  114. { "colon", ':' },
  115. { "semicolon", ';' },
  116. { "less-than-sign", '<' },
  117. { "equals-sign", '=' },
  118. { "greater-than-sign", '>' },
  119. { "question-mark", '?' },
  120. { "commercial-at", '@' },
  121. { "left-square-bracket", '[' },
  122. { "backslash", '\\' },
  123. { "reverse-solidus", '\\' },
  124. { "right-square-bracket", ']' },
  125. { "circumflex", '^' },
  126. { "circumflex-accent", '^' },
  127. { "underscore", '_' },
  128. { "low-line", '_' },
  129. { "grave-accent", '`' },
  130. { "left-brace", '{' },
  131. { "left-curly-bracket", '{' },
  132. { "vertical-line", '|' },
  133. { "right-brace", '}' },
  134. { "right-curly-bracket", '}' },
  135. { "tilde", '~' },
  136. { "DEL", '\177' },
  137. { NULL, 0 }
  138. };