Package antlr

Examples of antlr.TokenStreamHiddenTokenFilter.hide()


        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);

        final GeneratedJavaRecognizer parser =
            new GeneratedJavaRecognizer(filter);
        parser.setFilename(aContents.getFilename());
View Full Code Here


        lexer.setTokenObjectClass("antlr.CommonHiddenStreamToken");

        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());
View Full Code Here

            IDLLexer lexer = new IDLLexer(new java.io.LineNumberReader(preprocessor));
            lexer.setTokenObjectClass("antlr.CommonHiddenStreamToken");
            TokenStreamHiddenTokenFilter filter =
                new TokenStreamHiddenTokenFilter(lexer);
            filter.discard(IDLTokenTypes.WS);
            filter.hide(IDLTokenTypes.SL_COMMENT);
            filter.hide(IDLTokenTypes.ML_COMMENT);
            parser = new IDLParser(filter);
            parser.setASTNodeClass("antlr.CommonASTWithHiddenTokens");
            parser.specification();
        } catch (Exception ex) {
View Full Code Here

            lexer.setTokenObjectClass("antlr.CommonHiddenStreamToken");
            TokenStreamHiddenTokenFilter filter =
                new TokenStreamHiddenTokenFilter(lexer);
            filter.discard(IDLTokenTypes.WS);
            filter.hide(IDLTokenTypes.SL_COMMENT);
            filter.hide(IDLTokenTypes.ML_COMMENT);
            parser = new IDLParser(filter);
            parser.setASTNodeClass("antlr.CommonASTWithHiddenTokens");
            parser.specification();
        } catch (Exception ex) {
            throw new ToolException(ex);
View Full Code Here

            IDLLexer lexer = new IDLLexer(new java.io.LineNumberReader(preprocessor));
            lexer.setTokenObjectClass("antlr.CommonHiddenStreamToken");
            TokenStreamHiddenTokenFilter filter =
                new TokenStreamHiddenTokenFilter(lexer);
            filter.discard(IDLTokenTypes.WS);
            filter.hide(IDLTokenTypes.SL_COMMENT);
            filter.hide(IDLTokenTypes.ML_COMMENT);
            parser = new IDLParser(filter);
            parser.setASTNodeClass("antlr.CommonASTWithHiddenTokens");
            parser.specification();
        } catch (Exception ex) {
View Full Code Here

            lexer.setTokenObjectClass("antlr.CommonHiddenStreamToken");
            TokenStreamHiddenTokenFilter filter =
                new TokenStreamHiddenTokenFilter(lexer);
            filter.discard(IDLTokenTypes.WS);
            filter.hide(IDLTokenTypes.SL_COMMENT);
            filter.hide(IDLTokenTypes.ML_COMMENT);
            parser = new IDLParser(filter);
            parser.setASTNodeClass("antlr.CommonASTWithHiddenTokens");
            parser.specification();
        } catch (Exception ex) {
            throw new ToolException(ex);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.