}
return null;
}
private Properties collectDocNodes(File file) throws IOException {
Lexer lexer = new Lexer();
lexer.setSource(LexerSource.getSource(file.getName(), new FileReader(file), new ParserConfiguration()));
lexer.setPreserveSpaces(true);
lexer.setWarnings(new Parser.NullWarnings());
String doc;
int token = -1;
Properties props = new Properties();
while (lexer.advance()) {
if (token == -1)
token = lexer.token();
if (token == Tokens.tDOCUMENTATION) {
doc = "=" + lexer.getTokenBuffer().toString();
while (lexer.advance() && (token = lexer.token()) == Tokens.tWHITESPACE) {
}
if (token != Tokens.kDEF)
continue;
while (lexer.advance() && (token = lexer.token()) == Tokens.tWHITESPACE) {
}
if (token != Tokens.tIDENTIFIER)
continue;
props.setProperty(lexer.getTokenBuffer().toString(), doc);
}
token = -1;
}
return props;
}