//============================================================================== // tribble/io/CharI.java //------------------------------------------------------------------------------ package tribble.io; // System imports import java.lang.String; // Local imports // (None) /******************************************************************************* * Generic source character. * *

* This interface is used to implement classes representing a single character. * Such a stream can be used to hold text characters read from a source file, * containing information in addition to the character code itself, such as the * source line, column number, and filename from which the character was read. * * @version $Revision: 1.1 $ $Date: 2001/04/22 16:30:48 $ * @since 2001-04-22 * @author * David R. Tribble, * david@tribble.com. *
* Copyright ©2001 by David R. Tribble, * all rights reserved. *
* Permission is granted to freely use and distribute this source code * provided that the original copyright and authorship notices remain * intact. * * @see CharDfl * @see LexerI * @see CharInputStreamI */ public interface CharI { // Identification /** Revision information. */ static final String REV = "@(#)tribble/io/CharI.java $Revision: 1.1 $ $Date: 2001/04/22 16:30:48 $\n"; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Public methods /*************************************************************************** * Establishes the character code of this character. * * @param ch * The character code for this character. * * @since 1.1, 2001-04-22 */ public void setChar(char ch); /*************************************************************************** * Retrieves the character code of this character. * * @return * The character code for this character. * * @since 1.1, 2001-04-22 */ public char getChar(); /*************************************************************************** * Establishes the source line number and column number of this character. * * @param ln * The source line number for this character. * * @param col * The source column number for this token. * * @since 1.1, 2001-04-22 */ public void setLineNo(int ln, int col); /*************************************************************************** * Retrieves the source line number of this character. * * @return * The source line number for this character. * * @since 1.1, 2001-04-22 */ public int getLineNo(); /*************************************************************************** * Retrieves the source column number of this character. * * @return * The source column number for this character. * * @since 1.1, 2001-04-22 */ public int getColNo(); /*************************************************************************** * Establishes the source filename of this character. * * @param fname * The source filename for this character. * * @since 1.1, 2001-04-22 */ public void setFileName(String fname); /*************************************************************************** * Retrieves the source filename of this character. * * @return * The source filename for this character. * * @since 1.1, 2001-04-22 */ public String getFileName(); } // End CharI.java