Package com.puppycrawl.tools.checkstyle.grammars

Examples of com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaRecognizer


    lexer.setFilename(aContents.getFilename());
    lexer.setCommentListener(aContents);
    lexer.setTreatAssertAsKeyword(true);
    lexer.setTreatEnumAsKeyword(true);

    final GeneratedJavaRecognizer parser =
        new GeneratedJavaRecognizer(lexer);
    parser.setFilename(aContents.getFilename());
    parser.setASTNodeClass(DetailAST.class.getName());
    parser.compilationUnit();

    return (DetailAST) parser.getAST();
  }
View Full Code Here


        lexer.setFilename(aContents.getFilename());
        lexer.setCommentListener(aContents);
        lexer.setTreatAssertAsKeyword(true);
        lexer.setTreatEnumAsKeyword(true);

        final GeneratedJavaRecognizer parser =
            new GeneratedJavaRecognizer(lexer);
        parser.setFilename(aContents.getFilename());
        parser.setASTNodeClass(DetailAST.class.getName());
        parser.compilationUnit();

        return (DetailAST) parser.getAST();
    }
View Full Code Here

        lexer.setFilename(aContents.getFilename());
        lexer.setCommentListener(aContents);
        lexer.setTreatAssertAsKeyword(aTreatAssertAsKeyword);
        lexer.setTreatEnumAsKeyword(aTreatEnumAsKeyword);

        final GeneratedJavaRecognizer parser =
            aSilentlyConsumeErrors
                ? new SilentJavaRecognizer(lexer)
                : new GeneratedJavaRecognizer(lexer);
        parser.setFilename(aContents.getFilename());
        parser.setASTNodeClass(DetailAST.class.getName());
        parser.compilationUnit();

        return (DetailAST) parser.getAST();
    }
View Full Code Here

        final TokenStreamHiddenTokenFilter filter =
                new TokenStreamHiddenTokenFilter(lexer);
        filter.hide(TokenTypes.SINGLE_LINE_COMMENT);
        filter.hide(TokenTypes.BLOCK_COMMENT_BEGIN);

        final GeneratedJavaRecognizer parser =
            new GeneratedJavaRecognizer(filter);
        parser.setFilename(aContents.getFilename());
        parser.setASTNodeClass(DetailAST.class.getName());
        parser.compilationUnit();

        return (DetailAST) parser.getAST();
    }
View Full Code Here

        lexer.setFilename(aContents.getFilename());
        lexer.setCommentListener(aContents);
        lexer.setTreatAssertAsKeyword(aTreatAssertAsKeyword);
        lexer.setTreatEnumAsKeyword(aTreatEnumAsKeyword);

        final GeneratedJavaRecognizer parser =
            aSilentlyConsumeErrors
                ? new SilentJavaRecognizer(lexer)
                : new GeneratedJavaRecognizer(lexer);
        parser.setFilename(aContents.getFilename());
        parser.setASTNodeClass(DetailAST.class.getName());
        parser.compilationUnit();

        return (DetailAST) parser.getAST();
    }
View Full Code Here

TOP

Related Classes of com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaRecognizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.