0N/A/*
0N/A * CDDL HEADER START
0N/A *
0N/A * The contents of this file are subject to the terms of the
407N/A * Common Development and Distribution License (the "License").
0N/A * You may not use this file except in compliance with the License.
0N/A *
0N/A * See LICENSE.txt included in this distribution for the specific
0N/A * language governing permissions and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL HEADER in each
0N/A * file and include the License file at LICENSE.txt.
0N/A * If applicable, add the following below this CDDL HEADER, with the
0N/A * fields enclosed by brackets "[]" replaced with your own identifying
0N/A * information: Portions Copyright [yyyy] [name of copyright owner]
0N/A *
0N/A * CDDL HEADER END
0N/A */
0N/A
1111N/A/*
1190N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
1185N/A * Use is subject to license terms.
0N/A */
0N/Apackage org.opensolaris.opengrok.analysis.c;
0N/A
388N/Aimport java.util.HashSet;
1185N/Aimport java.util.Set;
816N/A
388N/A/**
388N/A * Holds static hash set containing the C keywords
816N/A */
388N/Apublic class Consts {
388N/A
388N/A public static final Set<String> kwd = new HashSet<String>();
388N/A
388N/A
508N/A static {
816N/A // CPP
1185N/A kwd.add("ident");
388N/A kwd.add("ifndef");
388N/A kwd.add("defined");
1185N/A kwd.add("endif");
819N/A kwd.add("include");
819N/A kwd.add("define");
508N/A kwd.add("ifdef");
350N/A kwd.add("pragma");
1185N/A
0N/A // C keywords
615N/A kwd.add("asm");
1195N/A kwd.add("auto");
1185N/A kwd.add("break");
1185N/A kwd.add("case");
388N/A kwd.add("char");
0N/A kwd.add("const");
1111N/A kwd.add("continue");
1185N/A kwd.add("default");
1111N/A kwd.add("do");
456N/A kwd.add("double");
456N/A kwd.add("else");
456N/A kwd.add("enum");
456N/A kwd.add("extern");
1185N/A kwd.add("float");
1111N/A kwd.add("for");
1185N/A kwd.add("goto");
1185N/A kwd.add("if");
1185N/A kwd.add("inline");
1185N/A kwd.add("int");
1185N/A kwd.add("long");
1185N/A kwd.add("register");
1185N/A kwd.add("restrict");
1111N/A kwd.add("return");
1111N/A kwd.add("short");
1190N/A kwd.add("signed");
1190N/A kwd.add("sizeof");
1190N/A kwd.add("static");
615N/A kwd.add("struct");
1190N/A kwd.add("switch");
1185N/A kwd.add("typedef");
1185N/A kwd.add("union");
1185N/A kwd.add("unsigned");
819N/A kwd.add("void");
0N/A kwd.add("volatile");
1185N/A kwd.add("while");
0N/A kwd.add("_Bool");
1185N/A kwd.add("_Complex");
0N/A kwd.add("_Imaginary");
0N/A // other keywords
0N/A kwd.add("bool");
0N/A kwd.add("true");
0N/A kwd.add("false");
1185N/A kwd.add("redeclared");
1185N/A }
1190N/A}
1185N/A