Examples of JFlexLexer


Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testDoubleQuotesInCharInAssignment() throws Exception {
        String in = "x = '\"';";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.IDENTIFIER, "x", lexer);
        assertLex(Parser.SEMI, lexer);
        assertLex(0, lexer);
    }
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testSingleQuoteInCharInAssignment() throws Exception {
        String in = "x = '\\'';";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.IDENTIFIER, "x", lexer);
        assertLex(Parser.SEMI, lexer);
        assertLex(0, lexer);
    }
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testStringWithDoubleQuotesIn() throws Exception {
        String in = "x = \"blah \\\" blah\";";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.IDENTIFIER, "x", lexer);
        assertLex(Parser.SEMI, lexer);
        assertLex(0, lexer);
    }
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testCommentsWithSingleQuoteInCodeBlock() throws Exception {
        String in = "{ /* ' */ }";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.CODEBLOCK, lexer);
        assertLex(0, lexer);
    }
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testCommentsWithDoubleQuotesInCodeBlock() throws Exception {
        String in = "{ /* \" */ }";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.CODEBLOCK, lexer);
        assertLex(0, lexer);
    }
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testCommentsThatEndImmediately() throws Exception {
        String in = "/**/ class";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.CLASS, lexer);
        assertLex(0, lexer);
    }
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testCommentsWithQuotesInAssignment() throws Exception {
        String in = "a x = y /* don't do stuff*/;";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.IDENTIFIER, "a", lexer);
        assertLex(Parser.IDENTIFIER, "x", lexer);
        assertLex(Parser.SEMI, lexer);
        assertLex(0, lexer);

        in = "a z = \n"
                + "// thing's thing \n"
                + "0;";
        lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.IDENTIFIER, "a", lexer);
        assertLex(Parser.IDENTIFIER, "z", lexer);
        assertLex(Parser.SEMI, lexer);
        assertLex(0, lexer);
    }
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

                + " * @hello world\n"
                + " * @a b c d\n"
                + " * @bye\n"
                + " * @bye:bye\n"
                + " */";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.JAVADOCSTART, lexer);

        assertLex(Parser.JAVADOCEOL, lexer);
        assertLex(Parser.JAVADOCTAG, "@hello", lexer);
        assertLex(Parser.JAVADOCTOKEN, "world", lexer);
View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testOneLinerDocComment() throws Exception {
        String in = "/** @hello world */";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.JAVADOCSTART, lexer);

        assertLex(Parser.JAVADOCTAG, "@hello", lexer);
        assertLex(Parser.JAVADOCTOKEN, "world", lexer);

View Full Code Here

Examples of com.thoughtworks.qdox.parser.impl.JFlexLexer

        assertLex(0, lexer);
    }

    public void testCompressedDocComment() throws Exception {
        String in = "/**@foo bar*/";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.JAVADOCSTART, lexer);
       
        assertLex(Parser.JAVADOCTAG, "@foo", lexer);
        assertLex(Parser.JAVADOCTOKEN, "bar", lexer);
       
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.