public static DetailAST parse(FileContents aContents)
throws RecognitionException, TokenStreamException
{
final String fullText = aContents.getText().getFullText().toString();
final Reader sr = new StringReader(fullText);
final GeneratedJavaLexer lexer = new GeneratedJavaLexer(sr);
lexer.setFilename(aContents.getFilename());
lexer.setCommentListener(aContents);
lexer.setTreatAssertAsKeyword(true);
lexer.setTreatEnumAsKeyword(true);
lexer.setTokenObjectClass("antlr.CommonHiddenStreamToken");
final TokenStreamHiddenTokenFilter filter =
new TokenStreamHiddenTokenFilter(lexer);
filter.hide(TokenTypes.SINGLE_LINE_COMMENT);
filter.hide(TokenTypes.BLOCK_COMMENT_BEGIN);