fr.umlv.tatoo.runtime.buffer
Interface CharacterBuffer

All Known Implementing Classes:
CharBufferWrapper, ReaderWrapper

public interface CharacterBuffer

A CharacterBuffer represents a character stream on which a Lexer can operate. Methods of this interface should never be used by the developper, they are only provided for lexer internal use.

Version:
$Revision: 1.7 $
Author:
Gilles Roussel
See Also:
Lexer

Method Summary
 char next()
          Reads the next character from the buffer.
 boolean previousWasNewLine()
          Determines if the last unwinded character was an end of line.
 void unwind(int l)
          Unwinds l characters from the buffer.
 

Method Detail

unwind

void unwind(int l)
Unwinds l characters from the buffer.

Parameters:
l - the number of characters to unwind

previousWasNewLine

boolean previousWasNewLine()
Determines if the last unwinded character was an end of line.

Returns:
true if the last unwinded character was an end of line; false otherwise

next

char next()
Reads the next character from the buffer. Current position in the buffer is incremented.

Returns:
the next character in the buffer