1153N/A/*
1153N/A * CDDL HEADER START
1153N/A *
1153N/A * The contents of this file are subject to the terms of the
1153N/A * Common Development and Distribution License (the "License").
1153N/A * You may not use this file except in compliance with the License.
1153N/A *
1153N/A * See LICENSE.txt included in this distribution for the specific
1153N/A * language governing permissions and limitations under the License.
1153N/A *
1153N/A * When distributing Covered Code, include this CDDL HEADER in each
1153N/A * file and include the License file at LICENSE.txt.
1153N/A * If applicable, add the following below this CDDL HEADER, with the
1153N/A * fields enclosed by brackets "[]" replaced with your own identifying
1153N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1153N/A *
1153N/A * CDDL HEADER END
1153N/A */
1153N/A
1153N/Apackage org.opensolaris.opengrok.analysis.php;
1153N/A
1153N/Aimport java.util.HashSet;
1153N/Aimport java.util.Set;
1153N/A
1153N/A/**
1153N/A * Holds static hash set containing the Perl keywords
1153N/A */
1153N/Apublic class Consts{
1461N/A /** The default list of known language keywords. */
1153N/A public static final Set<String> kwd = new HashSet<String>() ;
1153N/A static {
1153N/A //Keywords
1153N/A kwd.add("abstract"); //As of PHP5
1153N/A kwd.add("and");
1153N/A kwd.add("array");
1153N/A kwd.add("as");
1153N/A kwd.add("break");
1455N/A kwd.add("callable");
1153N/A kwd.add("case");
1153N/A kwd.add("catch"); //As of PHP5
1153N/A kwd.add("cfunction"); // PHP4 Only
1153N/A kwd.add("class");
1153N/A kwd.add("clone"); //As of PHP5
1153N/A kwd.add("const");
1153N/A kwd.add("continue");
1153N/A kwd.add("declare");
1153N/A kwd.add("default");
1153N/A kwd.add("do");
1153N/A kwd.add("else");
1153N/A kwd.add("elseif");
1153N/A kwd.add("enddeclare");
1153N/A kwd.add("endfor");
1153N/A kwd.add("endforeach");
1153N/A kwd.add("endif");
1153N/A kwd.add("endswitch");
1153N/A kwd.add("endwhile");
1153N/A kwd.add("extends");
1153N/A kwd.add("final"); //As of PHP5
1153N/A kwd.add("for");
1153N/A kwd.add("foreach");
1153N/A kwd.add("function");
1153N/A kwd.add("global");
1153N/A kwd.add("goto"); //As of PHP5.3
1455N/A kwd.add("instanceof");
1153N/A kwd.add("if");
1153N/A kwd.add("implements"); //As of PHP5
1455N/A kwd.add("insteadof"); //As of PHP5.4
1153N/A kwd.add("interface"); //As of PHP5
1153N/A kwd.add("interfaceof"); //As of PHP5
1153N/A kwd.add("namespace"); //As of PHP5
1153N/A kwd.add("new");
1153N/A kwd.add("old_function"); //PHP4 Only
1153N/A kwd.add("or");
1153N/A kwd.add("private"); //As of PHP5
1153N/A kwd.add("protected"); //As of PHP5
1153N/A kwd.add("public"); //As of PHP5
1153N/A kwd.add("static");
1153N/A kwd.add("switch");
1153N/A kwd.add("throw"); //As of PHP5
1455N/A kwd.add("trait"); //As of PHP5.4
1153N/A kwd.add("try"); //As of PHP5
1153N/A kwd.add("use");
1153N/A kwd.add("var");
1153N/A kwd.add("while");
1153N/A kwd.add("xor");
1153N/A
1153N/A //Constants
1153N/A kwd.add("__CLASS__");
1153N/A kwd.add("__DIR__"); //As of PHP5.3
1153N/A kwd.add("__FILE__");
1153N/A kwd.add("__FUNCTION__");
1153N/A kwd.add("__LINE__");
1153N/A kwd.add("__METHOD__");
1153N/A kwd.add("__NAMESPACE__");
1455N/A kwd.add("__TRAIT__"); //As of PHP5.4
1153N/A
1153N/A //Constructs
1153N/A kwd.add("die");
1153N/A kwd.add("echo");
1153N/A kwd.add("empty");
1153N/A kwd.add("exit");
1153N/A kwd.add("eval");
1153N/A kwd.add("include");
1153N/A kwd.add("include_once");
1153N/A kwd.add("isset");
1153N/A kwd.add("list");
1153N/A kwd.add("require");
1153N/A kwd.add("require_once");
1153N/A kwd.add("return");
1153N/A kwd.add("print");
1153N/A kwd.add("unset");
1455N/A
1455N/A //Misc
1455N/A kwd.add("__halt_compiler");
1153N/A }
1153N/A}