ShAnalyzer.java revision 73b36d5a6848ae9189f4f9e35a68947e89b1fe80
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * CDDL HEADER START
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * The contents of this file are subject to the terms of the
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * Common Development and Distribution License (the "License").
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * You may not use this file except in compliance with the License.
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * See LICENSE.txt included in this distribution for the specific
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * language governing permissions and limitations under the License.
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * When distributing Covered Code, include this CDDL HEADER in each
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * file and include the License file at LICENSE.txt.
300e4e43ed1ca46d0614459161ca2fb460ef661aTimo Sirainen * If applicable, add the following below this CDDL HEADER, with the
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * fields enclosed by brackets "[]" replaced with your own identifying
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * information: Portions Copyright [yyyy] [name of copyright owner]
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * CDDL HEADER END
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * Use is subject to license terms.
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * ident "%Z%%M% %I% %E% SMI"
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenimport org.opensolaris.opengrok.analysis.FileAnalyzer;
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenimport org.opensolaris.opengrok.analysis.plain.*;
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenimport org.opensolaris.opengrok.history.Annotation;
0a53eb0283d7ec28c6105f61e118b96fce8ecb95Timo Sirainen * Analyzes Shell scripts/Conf files etc.,
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * Created on September 21, 2005
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * @author Chandan
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenpublic class ShAnalyzer extends PlainAnalyzer {
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen /** Creates a new instance of ShAnalyzer */
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen public void analyze(Document doc, InputStream in) {
b4ddb5b3c3722620a8fef387dd8c47bb411a5643Timo Sirainen public TokenStream tokenStream(String fieldName, Reader reader) {
b4ddb5b3c3722620a8fef387dd8c47bb411a5643Timo Sirainen * Write a cross referenced HTML file.
b4ddb5b3c3722620a8fef387dd8c47bb411a5643Timo Sirainen * @param out Writer to write HTML cross-reference
b4ddb5b3c3722620a8fef387dd8c47bb411a5643Timo Sirainen public void writeXref(Writer out) throws IOException {
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen //lines = xref.getLine();
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * Write a cross referenced HTML file reads the source from in
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * @param in Input source
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * @param out Output xref writer
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * @param annotation annotation for the file (could be null)
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen public static void writeXref(InputStream in, Writer out,