Examples of JFlexLexer


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

            + " * joe@truemesh.com\n"
            + " * {@link here}.\n"
            + " * me @home\n"
            + " * geeks @ play\n"
            + " */";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.JAVADOCSTART, lexer);

        assertLex(Parser.JAVADOCEOL, lexer);
        assertLex(Parser.JAVADOCTOKEN, "joe@truemesh.com", lexer);
        assertLex(Parser.JAVADOCEOL, lexer);
View Full Code Here

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

                + "/**\n"
                + " * 5 * 4\n"
                + " * SELECT COUNT(*)\n"
                + " * **stars**everywhere** \n"
                + " */";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.JAVADOCSTART, lexer);

        assertLex(Parser.JAVADOCEOL, lexer);
        assertLex(Parser.JAVADOCTOKEN, "5", lexer);
        assertLex(Parser.JAVADOCTOKEN, "*", lexer);
View Full Code Here

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

    public void testExtraStarsAreIgnoredAtStartAndEnd() throws Exception {
        String in = ""
                + "/*****\n"
                + " * blah\n"
                + " *****/";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.JAVADOCSTART, lexer);
        assertLex(Parser.JAVADOCEOL, lexer);
        assertLex(Parser.JAVADOCTOKEN, "blah", lexer);
        assertLex(Parser.JAVADOCEOL, lexer);
        assertLex(Parser.JAVADOCEND, lexer);
View Full Code Here

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

    }

    public void testExtraStarsCompressed() throws Exception {
        String in = ""
                + "/***blah***/public";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.JAVADOCSTART, lexer);
        assertLex(Parser.JAVADOCTOKEN, "blah", lexer);
        assertLex(Parser.JAVADOCEND, lexer);
        assertLex(Parser.PUBLIC, lexer);
        assertLex(0, lexer);
View Full Code Here

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

            + "\t    * indented\n"
            + " *nospace\n"
            + " *** multistar\n"
            + " *\n"
            + " */";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.JAVADOCSTART, lexer);
       
        assertLex(Parser.JAVADOCEOL, lexer);
        assertLex(Parser.JAVADOCTOKEN, "simple", lexer);
        assertLex(Parser.JAVADOCEOL, lexer);
View Full Code Here

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

        assertLex(0, lexer);
    }

    public void testArrayTokens() throws Exception {
        String in = "String[] []o[]";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.IDENTIFIER, "String", lexer);
        assertLex(Parser.SQUAREOPEN, lexer);
        assertLex(Parser.SQUARECLOSE, lexer);
        assertLex(Parser.SQUAREOPEN, lexer);
        assertLex(Parser.SQUARECLOSE, lexer);
View Full Code Here

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

        assertSingleLex("super", Parser.SUPER);
    }

    public void testTypeTokens() throws Exception {
        String in = "Map<? extends A & B, List<String>>";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.IDENTIFIER, "Map", lexer);
        assertLex(Parser.LESSTHAN, lexer);
        assertLex(Parser.QUERY, lexer);
        assertLex(Parser.EXTENDS, lexer);
        assertLex(Parser.IDENTIFIER, "A", lexer);
View Full Code Here

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

        String in = ""
            + "public @interface Copyright {\n"
            + "    int year();\n"
            + "    String assignee() default \"The CodeHaus\";\n"
            + "}\n";
        Lexer lexer = new JFlexLexer(new StringReader(in));

        assertLex(Parser.PUBLIC, lexer);
        assertLex(Parser.AT, lexer);
        assertLex(Parser.INTERFACE, lexer);
        assertLex(Parser.IDENTIFIER, "Copyright", lexer);
View Full Code Here

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

    public void testAnnotationTokens() throws Exception {
        String in = ""
            + "@Copyright (year = 2004, month = \"Jan\")\n"
            + "@Note(\"Just ignore me\")\n"
            + "public class LexerTest extends TestCase {}\n";
        Lexer lexer = new JFlexLexer(new StringReader(in));

        assertLex(Parser.AT, lexer);
        assertLex(Parser.IDENTIFIER, "Copyright", lexer);
        assertLex(Parser.PARENOPEN, lexer);
        assertLex(Parser.IDENTIFIER, "year", lexer);
View Full Code Here

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

        assertLex(0, lexer);
    }

    public void testEnumConstructor() throws Exception {
        String in = "enum Foo { a(\"hello\"); int someField; }";
        Lexer lexer = new JFlexLexer(new StringReader(in));
        assertLex(Parser.ENUM, lexer);
        assertLex(Parser.IDENTIFIER, lexer);
        assertLex(Parser.BRACEOPEN, lexer);
        assertLex(Parser.IDENTIFIER, lexer);
        assertLex(Parser.PARENBLOCK, 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.