org.fife.rsta.ac.common
Class TokenScanner

java.lang.Object
  extended by org.fife.rsta.ac.common.TokenScanner

public class TokenScanner
extends Object

Returns non-whitespace, non-comment tokens from an RSyntaxDocument, one at a time. This can be used by simplistic LanguageSupports to "parse" for simple, easily-identifiable tokens, such as curly braces and Token.VARIABLEs. For example, to identify code blocks for languages structured like C and Java, you can use this class in conjunction with CodeBlock and VariableDeclaration to create an easily-parsable model of your source code.

Version:
1.0
Author:
Robert Futrell

Constructor Summary
TokenScanner(RSyntaxTextArea textArea)
           
 
Method Summary
 Token next()
          Returns the next non-whitespace, non-comment token in the text area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenScanner

public TokenScanner(RSyntaxTextArea textArea)
Method Detail

next

public Token next()
Returns the next non-whitespace, non-comment token in the text area.

Returns:
The next token, or null if we are at the end of its document.


Copyright © 2003-2011. All Rights Reserved.