202N/A/*
202N/A * CDDL HEADER START
202N/A *
202N/A * The contents of this file are subject to the terms of the
202N/A * Common Development and Distribution License (the "License").
202N/A * You may not use this file except in compliance with the License.
202N/A *
202N/A * See LICENSE.txt included in this distribution for the specific
202N/A * language governing permissions and limitations under the License.
202N/A *
202N/A * When distributing Covered Code, include this CDDL HEADER in each
202N/A * file and include the License file at LICENSE.txt.
202N/A * If applicable, add the following below this CDDL HEADER, with the
202N/A * fields enclosed by brackets "[]" replaced with your own identifying
202N/A * information: Portions Copyright [yyyy] [name of copyright owner]
202N/A *
202N/A * CDDL HEADER END
202N/A */
202N/A
202N/A/*
1127N/A * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
202N/A */
202N/A
202N/Apackage org.opensolaris.opengrok.analysis.c;
202N/A
394N/Aimport java.io.IOException;
921N/Aimport java.io.Reader;
1384N/A
1127N/Aimport org.opensolaris.opengrok.analysis.Definitions;
202N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzer;
202N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzer.Genre;
202N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzerFactory;
1384N/Aimport org.opensolaris.opengrok.analysis.XrefWriter;
271N/Aimport org.opensolaris.opengrok.configuration.Project;
202N/Aimport org.opensolaris.opengrok.history.Annotation;
202N/A
202N/Apublic class CAnalyzerFactory extends FileAnalyzerFactory {
202N/A private static final String[] SUFFIXES = {
202N/A "C",
202N/A "H",
202N/A "I",
202N/A "L",
202N/A "Y",
202N/A "LEX",
202N/A "YACC",
202N/A "D",
202N/A "S",
202N/A "XS", // Mainly found in perl directories
202N/A "X", // rpcgen input files
202N/A };
202N/A
202N/A public CAnalyzerFactory() {
483N/A super(null, SUFFIXES, null, null, "text/plain", Genre.PLAIN);
202N/A }
202N/A
202N/A @Override
202N/A protected FileAnalyzer newAnalyzer() {
202N/A return new CAnalyzer(this);
202N/A }
202N/A
202N/A @Override
1384N/A public void writeXref(Reader in, XrefWriter out, Definitions defs, Annotation annotation, Project project)
202N/A throws IOException {
1127N/A CAnalyzer.writeXref(in, out, defs, annotation, project);
202N/A }
202N/A}