tribble.io
Interface CharI

All Known Implementing Classes:
CharDfl

public interface CharI

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.

Since:
2001-04-22
Version:
$Revision: 1.1 $ $Date: 2001/04/22 16:30:48 $
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 Also:
CharDfl, LexerI, CharInputStreamI

Field Summary
static java.lang.String REV
          Revision information.
 
Method Summary
 char getChar()
          Retrieves the character code of this character.
 int getColNo()
          Retrieves the source column number of this character.
 java.lang.String getFileName()
          Retrieves the source filename of this character.
 int getLineNo()
          Retrieves the source line number of this character.
 void setChar(char ch)
          Establishes the character code of this character.
 void setFileName(java.lang.String fname)
          Establishes the source filename of this character.
 void setLineNo(int ln, int col)
          Establishes the source line number and column number of this character.
 

Field Detail

REV

static final java.lang.String REV
Revision information.

See Also:
Constant Field Values
Method Detail

setChar

void setChar(char ch)
Establishes the character code of this character.

Parameters:
ch - The character code for this character.
Since:
1.1, 2001-04-22

getChar

char getChar()
Retrieves the character code of this character.

Returns:
The character code for this character.
Since:
1.1, 2001-04-22

setLineNo

void setLineNo(int ln,
               int col)
Establishes the source line number and column number of this character.

Parameters:
ln - The source line number for this character.
col - The source column number for this token.
Since:
1.1, 2001-04-22

getLineNo

int getLineNo()
Retrieves the source line number of this character.

Returns:
The source line number for this character.
Since:
1.1, 2001-04-22

getColNo

int getColNo()
Retrieves the source column number of this character.

Returns:
The source column number for this character.
Since:
1.1, 2001-04-22

setFileName

void setFileName(java.lang.String fname)
Establishes the source filename of this character.

Parameters:
fname - The source filename for this character.
Since:
1.1, 2001-04-22

getFileName

java.lang.String getFileName()
Retrieves the source filename of this character.

Returns:
The source filename for this character.
Since:
1.1, 2001-04-22