1072N/A/*
1072N/A * CDDL HEADER START
1072N/A *
1072N/A * The contents of this file are subject to the terms of the
1072N/A * Common Development and Distribution License (the "License").
1072N/A * You may not use this file except in compliance with the License.
1072N/A *
1072N/A * See LICENSE.txt included in this distribution for the specific
1072N/A * language governing permissions and limitations under the License.
1072N/A *
1072N/A * When distributing Covered Code, include this CDDL HEADER in each
1072N/A * file and include the License file at LICENSE.txt.
1072N/A * If applicable, add the following below this CDDL HEADER, with the
1072N/A * fields enclosed by brackets "[]" replaced with your own identifying
1072N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1072N/A *
1072N/A * CDDL HEADER END
1072N/A */
1072N/A
1072N/A/*
1072N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1072N/A */
1072N/A
1072N/Apackage org.opensolaris.opengrok.analysis.perl;
1072N/A
1072N/Aimport java.io.IOException;
1072N/Aimport java.io.Reader;
1072N/Aimport java.io.Writer;
1127N/Aimport org.opensolaris.opengrok.analysis.Definitions;
1072N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzer;
1072N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzer.Genre;
1072N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzerFactory;
1072N/Aimport org.opensolaris.opengrok.configuration.Project;
1072N/Aimport org.opensolaris.opengrok.history.Annotation;
1072N/A
1072N/A/**
1072N/A *
1072N/A * @author Lubos Kosco
1072N/A */
1072N/A
1072N/Apublic class PerlAnalyzerFactory extends FileAnalyzerFactory {
1190N/A
1072N/A private static final String[] SUFFIXES = {
1072N/A "PL",
1073N/A "PERL",
1073N/A "PM"
1072N/A };
1072N/A private static final String[] MAGICS = {
1072N/A "#!/usr/bin/env perl",
1073N/A "#!/usr/bin/perl",
1073N/A "#!/bin/perl"
1072N/A };
1072N/A
1072N/A public PerlAnalyzerFactory() {
1072N/A super(null, SUFFIXES, MAGICS, null, "text/plain", Genre.PLAIN);
1072N/A }
1072N/A
1072N/A @Override
1072N/A protected FileAnalyzer newAnalyzer() {
1072N/A return new PerlAnalyzer(this);
1072N/A }
1072N/A
1072N/A @Override
1127N/A public void writeXref(Reader in, Writer out, Definitions defs, Annotation annotation, Project project)
1072N/A throws IOException {
1127N/A PerlAnalyzer.writeXref(in, out, defs, annotation, project);
1072N/A }
1072N/A}