Package org.sonar.sslr.channel
Provides a basic framework to sequentially read any kind of character stream in order to feed a generic OUTPUT.
This framework can used for instance in order to :
- Create a lexer in charge to generate a list of tokens from a character stream
- Create a source code syntax highligther in charge to decorate a source code with HTML tags
- Create a javadoc generator
- ...
ChannelDispatcher
class.
This class must be initialized with a CodeReader
and a list of Channel
.
The CodeReader
encapsulates any character stream in order to provide all mechanisms to Channels
in order to look ahead and look behind the current reading cursor position.
A Channel
is in charge to consume the character stream through the CodeReader in order to feed
the OUTPUT.- Since:
- 1.20
-
Interface Summary Interface Description EndMatcher -
Class Summary Class Description Channel<O> ChannelCodeReaderFilter<O> This class is a special CodeReaderFilter that uses Channels to filter the character stream before it is passed to the main channels declared for the CodeReader.ChannelDispatcher<O> ChannelDispatcher.Builder CodeBuffer The CodeBuffer class provides all the basic features required to manipulate a source code character stream.CodeBuffer.Cursor CodeReader The CodeReader class provides some advanced features to read a source code.CodeReaderConfiguration Configuration parameters used by a CodeReader to handle some specificities.CodeReaderFilter<O> This class can be extended to provide filtering capabilities for the CodeReader class.RegexChannel<O> The RegexChannel can be used to be called each time the next characters in the character stream match a regular expression -
Exception Summary Exception Description ChannelException