jsyntaxpane.lexers
Class EmptyLexer

java.lang.Object
  extended by jsyntaxpane.lexers.EmptyLexer
All Implemented Interfaces:
Lexer

public class EmptyLexer
extends java.lang.Object
implements Lexer

A lexer that does nothing. Used for plain document editing.

Author:
Ayman Al-Sairafi

Constructor Summary
EmptyLexer()
           
 
Method Summary
 void parse(javax.swing.text.Segment segment, int ofst, java.util.List<Token> tokens)
          This is the only method a Lexer needs to implement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyLexer

public EmptyLexer()
Method Detail

parse

public void parse(javax.swing.text.Segment segment,
                  int ofst,
                  java.util.List<Token> tokens)
Description copied from interface: Lexer
This is the only method a Lexer needs to implement. It will be passed a Reader, and it should return non-overlapping Tokens for each recognized token in the stream.

Specified by:
parse in interface Lexer
Parameters:
segment - Text to parse.
ofst - offset to add to start of each token (useful for nesting)
tokens - List of Tokens to be added. This is done so that the caller creates the appropriate List implementation and size. The parse method just adds to the list