asia.redact.bracket.properties
Class PropertiesLexer
java.lang.Object
asia.redact.bracket.properties.PropertiesLexer
public class PropertiesLexer
- extends Object
Parse a properties file conforming to the description at
http://download.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader)
into tokens.
There is one additional extension: a comment line which starts with #;; is treated
as transient (not read in). This is used later to generate a transient header and footer
This is an "off-line" lexer, it is backed by a String as input
- Author:
- Dave
- See Also:
PropertiesToken,
PropertiesTokenType,
InputAdapter
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
input
final String input
index
int index
list
final List<PropertiesToken> list
lock
private final Lock lock
PropertiesLexer
public PropertiesLexer(String input)
PropertiesLexer
public PropertiesLexer(Reader in)
PropertiesLexer
public PropertiesLexer(File in)
PropertiesLexer
public PropertiesLexer(InputStream in)
lex
public void lex()
analyzeLine
private void analyzeLine(String buf,
PropertiesToken tok)
scanKeyValue
private void scanKeyValue(String buf,
PropertiesToken eol)
comment
private void comment(String buf)
scanLineBreak
private PropertiesToken scanLineBreak()
hasNext
private boolean hasNext()
next
private char next()
la
private Character la(int count)
getList
public List<PropertiesToken> getList()
Copyright © 2011-2013 David R. Smith. All Rights Reserved.