summaryrefslogtreecommitdiff
path: root/tools/gnu/classpath/tools/javah/Keywords.java
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gnu/classpath/tools/javah/Keywords.java')
-rw-r--r--tools/gnu/classpath/tools/javah/Keywords.java131
1 files changed, 109 insertions, 22 deletions
diff --git a/tools/gnu/classpath/tools/javah/Keywords.java b/tools/gnu/classpath/tools/javah/Keywords.java
index 9cab62283..73e2c627c 100644
--- a/tools/gnu/classpath/tools/javah/Keywords.java
+++ b/tools/gnu/classpath/tools/javah/Keywords.java
@@ -42,28 +42,115 @@ import java.util.HashSet;
public class Keywords
{
- private static final String[] words = { "and", "and_eq", "asm", "auto",
- "bitand", "bitor", "bool", "break",
- "case", "catch", "char", "class",
- "compl", "const", "const_cast",
- "continue", "default", "delete", "do",
- "double", "dynamic_cast", "else",
- "enum", "explicit", "export",
- "extern", "false", "float", "for",
- "friend", "goto", "if", "inline",
- "int", "long", "mutable", "namespace",
- "new", "not", "not_eq", "operator",
- "or", "or_eq", "private", "protected",
- "public", "register",
- "reinterpret_cast", "return", "short",
- "signed", "sizeof", "static",
- "static_cast", "struct", "switch",
- "template", "this", "throw", "true",
- "try", "typedef", "typeid",
- "typename", "typeof", "union",
- "unsigned", "using", "virtual",
- "void", "volatile", "wchar_t",
- "while", "xor", "xor_eq" };
+/* A sorted list of all C++ keywords. This is identical to the list
+ in gcc/java/mangle.c. */
+ private static final String[] words =
+ {
+ "_Complex",
+ "__alignof",
+ "__alignof__",
+ "__asm",
+ "__asm__",
+ "__attribute",
+ "__attribute__",
+ "__builtin_va_arg",
+ "__complex",
+ "__complex__",
+ "__const",
+ "__const__",
+ "__extension__",
+ "__imag",
+ "__imag__",
+ "__inline",
+ "__inline__",
+ "__label__",
+ "__null",
+ "__real",
+ "__real__",
+ "__restrict",
+ "__restrict__",
+ "__signed",
+ "__signed__",
+ "__typeof",
+ "__typeof__",
+ "__volatile",
+ "__volatile__",
+ "and",
+ "and_eq",
+ "asm",
+ "auto",
+ "bitand",
+ "bitor",
+ "bool",
+ "break",
+ "case",
+ "catch",
+ "char",
+ "class",
+ "compl",
+ "const",
+ "const_cast",
+ "continue",
+ "default",
+ "delete",
+ "do",
+ "double",
+ "dynamic_cast",
+ "else",
+ "enum",
+ "explicit",
+ "export",
+ "extern",
+ "false",
+ "float",
+ "for",
+ "friend",
+ "goto",
+ "if",
+ "inline",
+ "int",
+ "long",
+ "mutable",
+ "namespace",
+ "new",
+ "not",
+ "not_eq",
+ "operator",
+ "or",
+ "or_eq",
+ "private",
+ "protected",
+ "public",
+ "register",
+ "reinterpret_cast",
+ "return",
+ "short",
+ "signed",
+ "sizeof",
+ "static",
+ "static_cast",
+ "struct",
+ "switch",
+ "template",
+ "this",
+ "throw",
+ "true",
+ "try",
+ "typedef",
+ "typeid",
+ "typename",
+ "typeof",
+ "union",
+ "unsigned",
+ "using",
+ "virtual",
+ "void",
+ "volatile",
+ "wchar_t",
+ "while",
+ "xor",
+ "xor_eq"
+ };
private static final HashSet<String> keywords;
static