1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * See LICENSE.txt included in this distribution for the specific 9 * language governing permissions and limitations under the License. 10 * 11 * When distributing Covered Code, include this CDDL HEADER in each 12 * file and include the License file at LICENSE.txt. 13 * If applicable, add the following below this CDDL HEADER, with the 14 * fields enclosed by brackets "[]" replaced with your own identifying 15 * information: Portions Copyright [yyyy] [name of copyright owner] 16 * 17 * CDDL HEADER END 18 */ 19 20 /* 21 * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. 22 * Portions Copyright (c) 2017, Chris Fraire <cfraire@me.com>. 23 */ 24 package org.opengrok.indexer.analysis.haskell; 25 26 import java.util.HashSet; 27 import java.util.Set; 28 29 /** 30 * Holds static hash set containing the Haskell keywords. 31 * @author Harry Pan 32 */ 33 public class Consts { 34 35 static final Set<String> kwd = new HashSet<>(); 36 static { 37 // Haskell 2010 Language Report, Chapter 2.4 38 kwd.add("case"); 39 kwd.add("class"); 40 kwd.add("data"); 41 kwd.add("default"); 42 kwd.add("deriving"); 43 kwd.add("do"); 44 kwd.add("else"); 45 kwd.add("foreign"); 46 kwd.add("if"); 47 kwd.add("import"); 48 kwd.add("in"); 49 kwd.add("infix"); 50 kwd.add("infixl"); 51 kwd.add("infixr"); 52 kwd.add("instance"); 53 kwd.add("let"); 54 kwd.add("module"); 55 kwd.add("newtype"); 56 kwd.add("of"); 57 kwd.add("then"); 58 kwd.add("type"); 59 kwd.add("where"); 60 61 kwd.add("_"); // 2.4 Identifiers and Operators 62 } 63 Consts()64 private Consts() { 65 } 66 67 } 68