Search in sources :

Example 11 with DescriptionContext

use of com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext in project checkstyle by checkstyle.

the class ParseTreeBuilder method treeTextBeforeJavadocTags.

public static ParseTree treeTextBeforeJavadocTags() {
    JavadocContext javadocContext0 = new JavadocContext(null, 0);
    CommonToken newline0 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    javadocContext0.addChild(newline0);
    CommonToken leadingAsterisk0 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, " *");
    javadocContext0.addChild(leadingAsterisk0);
    TextContext textContext0 = new TextContext(javadocContext0, 0);
    CommonToken ws0 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws0);
    CommonToken char0 = new CommonToken(JavadocTokenTypes.CHAR, "a");
    textContext0.addChild(char0);
    CommonToken ws1 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws1);
    CommonToken char1 = new CommonToken(JavadocTokenTypes.CHAR, "b");
    textContext0.addChild(char1);
    javadocContext0.addChild(textContext0);
    CommonToken newline1 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    javadocContext0.addChild(newline1);
    CommonToken leadingAsterisk1 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, " *");
    javadocContext0.addChild(leadingAsterisk1);
    TextContext textContext1 = new TextContext(javadocContext0, 0);
    CommonToken ws2 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext1.addChild(ws2);
    CommonToken char2 = new CommonToken(JavadocTokenTypes.CHAR, "c");
    textContext1.addChild(char2);
    javadocContext0.addChild(textContext1);
    CommonToken newline2 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    javadocContext0.addChild(newline2);
    CommonToken leadingAsterisk2 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, " *");
    javadocContext0.addChild(leadingAsterisk2);
    CommonToken ws3 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocContext0.addChild(ws3);
    JavadocTagContext javadocTagContext0 = new JavadocTagContext(javadocContext0, 0);
    CommonToken seeLiteral0 = new CommonToken(JavadocTokenTypes.SEE_LITERAL, "@see");
    javadocTagContext0.addChild(seeLiteral0);
    CommonToken ws4 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocTagContext0.addChild(ws4);
    ReferenceContext referenceContext0 = new ReferenceContext(javadocTagContext0, 0);
    CommonToken class0 = new CommonToken(JavadocTokenTypes.CLASS, "Integer");
    referenceContext0.addChild(class0);
    javadocTagContext0.addChild(referenceContext0);
    CommonToken ws5 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocTagContext0.addChild(ws5);
    DescriptionContext descriptionContext0 = new DescriptionContext(javadocTagContext0, 0);
    TextContext textContext2 = new TextContext(descriptionContext0, 0);
    CommonToken char3 = new CommonToken(JavadocTokenTypes.CHAR, "I");
    textContext2.addChild(char3);
    CommonToken char4 = new CommonToken(JavadocTokenTypes.CHAR, "n");
    textContext2.addChild(char4);
    CommonToken char5 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext2.addChild(char5);
    descriptionContext0.addChild(textContext2);
    CommonToken newline3 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    descriptionContext0.addChild(newline3);
    javadocTagContext0.addChild(descriptionContext0);
    javadocContext0.addChild(javadocTagContext0);
    CommonToken leadingAsterisk3 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, " *");
    javadocContext0.addChild(leadingAsterisk3);
    CommonToken ws6 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocContext0.addChild(ws6);
    JavadocTagContext javadocTagContext1 = new JavadocTagContext(javadocContext0, 0);
    CommonToken authorLiteral0 = new CommonToken(JavadocTokenTypes.AUTHOR_LITERAL, "@author");
    javadocTagContext1.addChild(authorLiteral0);
    CommonToken ws7 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocTagContext1.addChild(ws7);
    DescriptionContext descriptionContext1 = new DescriptionContext(javadocTagContext1, 0);
    TextContext textContext3 = new TextContext(descriptionContext1, 0);
    CommonToken char6 = new CommonToken(JavadocTokenTypes.CHAR, "W");
    textContext3.addChild(char6);
    CommonToken char7 = new CommonToken(JavadocTokenTypes.CHAR, "a");
    textContext3.addChild(char7);
    CommonToken char8 = new CommonToken(JavadocTokenTypes.CHAR, "l");
    textContext3.addChild(char8);
    CommonToken char9 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext3.addChild(char9);
    CommonToken char10 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext3.addChild(char10);
    CommonToken char11 = new CommonToken(JavadocTokenTypes.CHAR, "r");
    textContext3.addChild(char11);
    CommonToken ws8 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext3.addChild(ws8);
    CommonToken char12 = new CommonToken(JavadocTokenTypes.CHAR, "W");
    textContext3.addChild(char12);
    CommonToken char13 = new CommonToken(JavadocTokenTypes.CHAR, "h");
    textContext3.addChild(char13);
    CommonToken char14 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext3.addChild(char14);
    CommonToken char15 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext3.addChild(char15);
    CommonToken char16 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext3.addChild(char16);
    descriptionContext1.addChild(textContext3);
    CommonToken newline4 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    descriptionContext1.addChild(newline4);
    javadocTagContext1.addChild(descriptionContext1);
    javadocContext0.addChild(javadocTagContext1);
    CommonToken leadingAsterisk4 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, " *");
    javadocContext0.addChild(leadingAsterisk4);
    CommonToken ws9 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocContext0.addChild(ws9);
    JavadocTagContext javadocTagContext2 = new JavadocTagContext(javadocContext0, 0);
    CommonToken authorLiteral1 = new CommonToken(JavadocTokenTypes.AUTHOR_LITERAL, "@author");
    javadocTagContext2.addChild(authorLiteral1);
    CommonToken ws10 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocTagContext2.addChild(ws10);
    DescriptionContext descriptionContext2 = new DescriptionContext(javadocTagContext2, 0);
    TextContext textContext4 = new TextContext(descriptionContext2, 0);
    CommonToken char17 = new CommonToken(JavadocTokenTypes.CHAR, "J");
    textContext4.addChild(char17);
    CommonToken char18 = new CommonToken(JavadocTokenTypes.CHAR, "o");
    textContext4.addChild(char18);
    CommonToken char19 = new CommonToken(JavadocTokenTypes.CHAR, "h");
    textContext4.addChild(char19);
    CommonToken char20 = new CommonToken(JavadocTokenTypes.CHAR, "n");
    textContext4.addChild(char20);
    CommonToken ws11 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext4.addChild(ws11);
    CommonToken char21 = new CommonToken(JavadocTokenTypes.CHAR, "S");
    textContext4.addChild(char21);
    CommonToken char22 = new CommonToken(JavadocTokenTypes.CHAR, "n");
    textContext4.addChild(char22);
    CommonToken char23 = new CommonToken(JavadocTokenTypes.CHAR, "o");
    textContext4.addChild(char23);
    CommonToken char24 = new CommonToken(JavadocTokenTypes.CHAR, "w");
    textContext4.addChild(char24);
    descriptionContext2.addChild(textContext4);
    CommonToken newline5 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    descriptionContext2.addChild(newline5);
    TextContext textContext5 = new TextContext(descriptionContext2, 0);
    CommonToken ws12 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext5.addChild(ws12);
    descriptionContext2.addChild(textContext5);
    javadocTagContext2.addChild(descriptionContext2);
    javadocContext0.addChild(javadocTagContext2);
    CommonToken eof0 = new CommonToken(JavadocTokenTypes.EOF, "<EOF>");
    javadocContext0.addChild(eof0);
    return javadocContext0;
}
Also used : TextContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.TextContext) JavadocContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocContext) ReferenceContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.ReferenceContext) JavadocTagContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocTagContext) CommonToken(org.antlr.v4.runtime.CommonToken) DescriptionContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext)

Example 12 with DescriptionContext

use of com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext in project checkstyle by checkstyle.

the class ParseTreeBuilder method treeCustomJavadocTags.

public static ParseTree treeCustomJavadocTags() {
    JavadocContext javadocContext0 = new JavadocContext(null, 0);
    CommonToken leadingAsterisk0 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, " *");
    javadocContext0.addChild(leadingAsterisk0);
    CommonToken ws0 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocContext0.addChild(ws0);
    JavadocTagContext javadocTagContext0 = new JavadocTagContext(javadocContext0, 0);
    CommonToken customName0 = new CommonToken(JavadocTokenTypes.CUSTOM_NAME, "@myTag");
    javadocTagContext0.addChild(customName0);
    CommonToken ws1 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocTagContext0.addChild(ws1);
    DescriptionContext descriptionContext0 = new DescriptionContext(javadocTagContext0, 0);
    TextContext textContext0 = new TextContext(descriptionContext0, 0);
    CommonToken char0 = new CommonToken(JavadocTokenTypes.CHAR, "y");
    textContext0.addChild(char0);
    CommonToken char1 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext0.addChild(char1);
    CommonToken char2 = new CommonToken(JavadocTokenTypes.CHAR, "s");
    textContext0.addChild(char2);
    CommonToken ws2 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws2);
    CommonToken char3 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char3);
    CommonToken char4 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext0.addChild(char4);
    CommonToken ws3 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws3);
    CommonToken char5 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char5);
    CommonToken char6 = new CommonToken(JavadocTokenTypes.CHAR, "s");
    textContext0.addChild(char6);
    descriptionContext0.addChild(textContext0);
    CommonToken newline0 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    descriptionContext0.addChild(newline0);
    javadocTagContext0.addChild(descriptionContext0);
    javadocContext0.addChild(javadocTagContext0);
    CommonToken leadingAsterisk1 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, " *");
    javadocContext0.addChild(leadingAsterisk1);
    CommonToken ws4 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocContext0.addChild(ws4);
    JavadocTagContext javadocTagContext1 = new JavadocTagContext(javadocContext0, 0);
    CommonToken customName1 = new CommonToken(JavadocTokenTypes.CUSTOM_NAME, "@anotherTagWithoutParameter");
    javadocTagContext1.addChild(customName1);
    CommonToken newline1 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    javadocTagContext1.addChild(newline1);
    javadocContext0.addChild(javadocTagContext1);
    CommonToken leadingAsterisk2 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, " *");
    javadocContext0.addChild(leadingAsterisk2);
    CommonToken ws5 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocContext0.addChild(ws5);
    JavadocTagContext javadocTagContext2 = new JavadocTagContext(javadocContext0, 0);
    CommonToken authorLiteral0 = new CommonToken(JavadocTokenTypes.AUTHOR_LITERAL, "@author");
    javadocTagContext2.addChild(authorLiteral0);
    CommonToken ws6 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocTagContext2.addChild(ws6);
    DescriptionContext descriptionContext1 = new DescriptionContext(javadocTagContext2, 0);
    TextContext textContext1 = new TextContext(descriptionContext1, 0);
    CommonToken char7 = new CommonToken(JavadocTokenTypes.CHAR, "I");
    textContext1.addChild(char7);
    descriptionContext1.addChild(textContext1);
    CommonToken newline2 = new CommonToken(JavadocTokenTypes.NEWLINE, LINE_SEPARATOR);
    descriptionContext1.addChild(newline2);
    TextContext textContext2 = new TextContext(descriptionContext1, 0);
    CommonToken ws7 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext2.addChild(ws7);
    descriptionContext1.addChild(textContext2);
    javadocTagContext2.addChild(descriptionContext1);
    javadocContext0.addChild(javadocTagContext2);
    CommonToken eof0 = new CommonToken(JavadocTokenTypes.EOF, "<EOF>");
    javadocContext0.addChild(eof0);
    return javadocContext0;
}
Also used : TextContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.TextContext) JavadocContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocContext) JavadocTagContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocTagContext) CommonToken(org.antlr.v4.runtime.CommonToken) DescriptionContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext)

Example 13 with DescriptionContext

use of com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext in project checkstyle by checkstyle.

the class ParseTreeBuilder method treeTwoLinkTagsInRow.

public static ParseTree treeTwoLinkTagsInRow() {
    JavadocContext javadocContext0 = new JavadocContext(null, 0);
    JavadocInlineTagContext javadocInlineTagContext0 = new JavadocInlineTagContext(javadocContext0, 0);
    CommonToken javadocInlineTagStart0 = new CommonToken(JavadocTokenTypes.JAVADOC_INLINE_TAG_START, "{");
    javadocInlineTagContext0.addChild(javadocInlineTagStart0);
    CommonToken linkLiteral0 = new CommonToken(JavadocTokenTypes.LINK_LITERAL, "@link");
    javadocInlineTagContext0.addChild(linkLiteral0);
    CommonToken ws0 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocInlineTagContext0.addChild(ws0);
    ReferenceContext referenceContext0 = new ReferenceContext(javadocInlineTagContext0, 0);
    CommonToken hash0 = new CommonToken(JavadocTokenTypes.HASH, "#");
    referenceContext0.addChild(hash0);
    CommonToken member0 = new CommonToken(JavadocTokenTypes.MEMBER, "WHITESPACE");
    referenceContext0.addChild(member0);
    javadocInlineTagContext0.addChild(referenceContext0);
    DescriptionContext descriptionContext0 = new DescriptionContext(javadocInlineTagContext0, 0);
    TextContext textContext0 = new TextContext(descriptionContext0, 0);
    CommonToken ws1 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws1);
    CommonToken char0 = new CommonToken(JavadocTokenTypes.CHAR, "W");
    textContext0.addChild(char0);
    CommonToken char1 = new CommonToken(JavadocTokenTypes.CHAR, "H");
    textContext0.addChild(char1);
    CommonToken char2 = new CommonToken(JavadocTokenTypes.CHAR, "I");
    textContext0.addChild(char2);
    CommonToken char3 = new CommonToken(JavadocTokenTypes.CHAR, "T");
    textContext0.addChild(char3);
    CommonToken char4 = new CommonToken(JavadocTokenTypes.CHAR, "E");
    textContext0.addChild(char4);
    CommonToken char5 = new CommonToken(JavadocTokenTypes.CHAR, "S");
    textContext0.addChild(char5);
    CommonToken char6 = new CommonToken(JavadocTokenTypes.CHAR, "P");
    textContext0.addChild(char6);
    CommonToken char7 = new CommonToken(JavadocTokenTypes.CHAR, "A");
    textContext0.addChild(char7);
    CommonToken char8 = new CommonToken(JavadocTokenTypes.CHAR, "C");
    textContext0.addChild(char8);
    CommonToken char9 = new CommonToken(JavadocTokenTypes.CHAR, "E");
    textContext0.addChild(char9);
    descriptionContext0.addChild(textContext0);
    javadocInlineTagContext0.addChild(descriptionContext0);
    CommonToken javadocInlineTagEnd0 = new CommonToken(JavadocTokenTypes.JAVADOC_INLINE_TAG_END, "}");
    javadocInlineTagContext0.addChild(javadocInlineTagEnd0);
    javadocContext0.addChild(javadocInlineTagContext0);
    JavadocInlineTagContext javadocInlineTagContext1 = new JavadocInlineTagContext(javadocContext0, 0);
    CommonToken javadocInlineTagStart1 = new CommonToken(JavadocTokenTypes.JAVADOC_INLINE_TAG_START, "{");
    javadocInlineTagContext1.addChild(javadocInlineTagStart1);
    CommonToken linkLiteral1 = new CommonToken(JavadocTokenTypes.LINK_LITERAL, "@link");
    javadocInlineTagContext1.addChild(linkLiteral1);
    CommonToken ws2 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocInlineTagContext1.addChild(ws2);
    ReferenceContext referenceContext1 = new ReferenceContext(javadocInlineTagContext1, 0);
    CommonToken hash1 = new CommonToken(JavadocTokenTypes.HASH, "#");
    referenceContext1.addChild(hash1);
    CommonToken member1 = new CommonToken(JavadocTokenTypes.MEMBER, "trimFrom");
    referenceContext1.addChild(member1);
    javadocInlineTagContext1.addChild(referenceContext1);
    DescriptionContext descriptionContext1 = new DescriptionContext(javadocInlineTagContext1, 0);
    TextContext textContext1 = new TextContext(descriptionContext1, 0);
    CommonToken ws3 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext1.addChild(ws3);
    CommonToken char10 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext1.addChild(char10);
    CommonToken char11 = new CommonToken(JavadocTokenTypes.CHAR, "r");
    textContext1.addChild(char11);
    CommonToken char12 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext1.addChild(char12);
    CommonToken char13 = new CommonToken(JavadocTokenTypes.CHAR, "m");
    textContext1.addChild(char13);
    CommonToken char14 = new CommonToken(JavadocTokenTypes.CHAR, "F");
    textContext1.addChild(char14);
    CommonToken char15 = new CommonToken(JavadocTokenTypes.CHAR, "r");
    textContext1.addChild(char15);
    CommonToken char16 = new CommonToken(JavadocTokenTypes.CHAR, "o");
    textContext1.addChild(char16);
    CommonToken char17 = new CommonToken(JavadocTokenTypes.CHAR, "m");
    textContext1.addChild(char17);
    descriptionContext1.addChild(textContext1);
    javadocInlineTagContext1.addChild(descriptionContext1);
    CommonToken javadocInlineTagEnd1 = new CommonToken(JavadocTokenTypes.JAVADOC_INLINE_TAG_END, "}");
    javadocInlineTagContext1.addChild(javadocInlineTagEnd1);
    javadocContext0.addChild(javadocInlineTagContext1);
    CommonToken eof0 = new CommonToken(JavadocTokenTypes.EOF, "<EOF>");
    javadocContext0.addChild(eof0);
    return javadocContext0;
}
Also used : TextContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.TextContext) JavadocContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocContext) JavadocInlineTagContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocInlineTagContext) ReferenceContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.ReferenceContext) CommonToken(org.antlr.v4.runtime.CommonToken) DescriptionContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext)

Example 14 with DescriptionContext

use of com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext in project checkstyle by checkstyle.

the class ParseTreeBuilder method treeSeeReferenceWithFewNestedClasses.

public static ParseTree treeSeeReferenceWithFewNestedClasses() {
    JavadocContext javadocContext0 = new JavadocContext(null, 0);
    JavadocTagContext javadocTagContext0 = new JavadocTagContext(javadocContext0, 0);
    CommonToken seeLiteral0 = new CommonToken(JavadocTokenTypes.SEE_LITERAL, "@see");
    javadocTagContext0.addChild(seeLiteral0);
    CommonToken ws0 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocTagContext0.addChild(ws0);
    ReferenceContext referenceContext0 = new ReferenceContext(javadocTagContext0, 0);
    CommonToken package0 = new CommonToken(JavadocTokenTypes.PACKAGE, "java.lang");
    referenceContext0.addChild(package0);
    CommonToken dot0 = new CommonToken(JavadocTokenTypes.DOT, ".");
    referenceContext0.addChild(dot0);
    CommonToken class0 = new CommonToken(JavadocTokenTypes.CLASS, "Integer");
    referenceContext0.addChild(class0);
    CommonToken dot1 = new CommonToken(JavadocTokenTypes.DOT, ".");
    referenceContext0.addChild(dot1);
    CommonToken class1 = new CommonToken(JavadocTokenTypes.CLASS, "Nested");
    referenceContext0.addChild(class1);
    CommonToken dot2 = new CommonToken(JavadocTokenTypes.DOT, ".");
    referenceContext0.addChild(dot2);
    CommonToken class2 = new CommonToken(JavadocTokenTypes.CLASS, "AnotherNested");
    referenceContext0.addChild(class2);
    CommonToken hash0 = new CommonToken(JavadocTokenTypes.HASH, "#");
    referenceContext0.addChild(hash0);
    CommonToken member0 = new CommonToken(JavadocTokenTypes.MEMBER, "someMethod");
    referenceContext0.addChild(member0);
    ParametersContext parametersContext0 = new ParametersContext(referenceContext0, 0);
    CommonToken leftBrace0 = new CommonToken(JavadocTokenTypes.LEFT_BRACE, "(");
    parametersContext0.addChild(leftBrace0);
    CommonToken argument0 = new CommonToken(JavadocTokenTypes.ARGUMENT, "String");
    parametersContext0.addChild(argument0);
    CommonToken comma0 = new CommonToken(JavadocTokenTypes.COMMA, ",");
    parametersContext0.addChild(comma0);
    CommonToken ws1 = new CommonToken(JavadocTokenTypes.WS, " ");
    parametersContext0.addChild(ws1);
    CommonToken argument1 = new CommonToken(JavadocTokenTypes.ARGUMENT, "int");
    parametersContext0.addChild(argument1);
    CommonToken rightBrace0 = new CommonToken(JavadocTokenTypes.RIGHT_BRACE, ")");
    parametersContext0.addChild(rightBrace0);
    referenceContext0.addChild(parametersContext0);
    javadocTagContext0.addChild(referenceContext0);
    CommonToken ws2 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocTagContext0.addChild(ws2);
    DescriptionContext descriptionContext0 = new DescriptionContext(javadocTagContext0, 0);
    TextContext textContext0 = new TextContext(descriptionContext0, 0);
    CommonToken char0 = new CommonToken(JavadocTokenTypes.CHAR, "D");
    textContext0.addChild(char0);
    CommonToken char1 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext0.addChild(char1);
    CommonToken char2 = new CommonToken(JavadocTokenTypes.CHAR, "s");
    textContext0.addChild(char2);
    CommonToken char3 = new CommonToken(JavadocTokenTypes.CHAR, "c");
    textContext0.addChild(char3);
    CommonToken char4 = new CommonToken(JavadocTokenTypes.CHAR, "r");
    textContext0.addChild(char4);
    CommonToken char5 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char5);
    CommonToken char6 = new CommonToken(JavadocTokenTypes.CHAR, "p");
    textContext0.addChild(char6);
    CommonToken char7 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext0.addChild(char7);
    CommonToken char8 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char8);
    CommonToken char9 = new CommonToken(JavadocTokenTypes.CHAR, "o");
    textContext0.addChild(char9);
    CommonToken char10 = new CommonToken(JavadocTokenTypes.CHAR, "n");
    textContext0.addChild(char10);
    CommonToken ws3 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws3);
    CommonToken char11 = new CommonToken(JavadocTokenTypes.CHAR, "o");
    textContext0.addChild(char11);
    CommonToken char12 = new CommonToken(JavadocTokenTypes.CHAR, "f");
    textContext0.addChild(char12);
    CommonToken ws4 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws4);
    CommonToken char13 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext0.addChild(char13);
    CommonToken char14 = new CommonToken(JavadocTokenTypes.CHAR, "h");
    textContext0.addChild(char14);
    CommonToken char15 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext0.addChild(char15);
    CommonToken ws5 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws5);
    CommonToken char16 = new CommonToken(JavadocTokenTypes.CHAR, "l");
    textContext0.addChild(char16);
    CommonToken char17 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char17);
    CommonToken char18 = new CommonToken(JavadocTokenTypes.CHAR, "n");
    textContext0.addChild(char18);
    CommonToken char19 = new CommonToken(JavadocTokenTypes.CHAR, "k");
    textContext0.addChild(char19);
    descriptionContext0.addChild(textContext0);
    javadocTagContext0.addChild(descriptionContext0);
    javadocContext0.addChild(javadocTagContext0);
    CommonToken eof0 = new CommonToken(JavadocTokenTypes.EOF, "<EOF>");
    javadocContext0.addChild(eof0);
    return javadocContext0;
}
Also used : ParametersContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.ParametersContext) TextContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.TextContext) JavadocContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocContext) ReferenceContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.ReferenceContext) JavadocTagContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocTagContext) CommonToken(org.antlr.v4.runtime.CommonToken) DescriptionContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext)

Example 15 with DescriptionContext

use of com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext in project checkstyle by checkstyle.

the class ParseTreeBuilder method treeFewWhiteSpacesAsSeparator.

public static ParseTree treeFewWhiteSpacesAsSeparator() {
    JavadocContext javadocContext0 = new JavadocContext(null, 0);
    CommonToken leadingAsterisk0 = new CommonToken(JavadocTokenTypes.LEADING_ASTERISK, "       *");
    javadocContext0.addChild(leadingAsterisk0);
    CommonToken ws0 = new CommonToken(JavadocTokenTypes.WS, " ");
    javadocContext0.addChild(ws0);
    JavadocTagContext javadocTagContext0 = new JavadocTagContext(javadocContext0, 0);
    CommonToken paramLiteral0 = new CommonToken(JavadocTokenTypes.PARAM_LITERAL, "@param");
    javadocTagContext0.addChild(paramLiteral0);
    CommonToken ws1 = new CommonToken(JavadocTokenTypes.WS, "   ");
    javadocTagContext0.addChild(ws1);
    CommonToken parameterName0 = new CommonToken(JavadocTokenTypes.PARAMETER_NAME, "initialCapacity");
    javadocTagContext0.addChild(parameterName0);
    CommonToken ws2 = new CommonToken(JavadocTokenTypes.WS, "     ");
    javadocTagContext0.addChild(ws2);
    DescriptionContext descriptionContext0 = new DescriptionContext(javadocTagContext0, 0);
    TextContext textContext0 = new TextContext(descriptionContext0, 0);
    CommonToken char0 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext0.addChild(char0);
    CommonToken char1 = new CommonToken(JavadocTokenTypes.CHAR, "h");
    textContext0.addChild(char1);
    CommonToken char2 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext0.addChild(char2);
    CommonToken ws3 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws3);
    CommonToken char3 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char3);
    CommonToken char4 = new CommonToken(JavadocTokenTypes.CHAR, "n");
    textContext0.addChild(char4);
    CommonToken char5 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char5);
    CommonToken char6 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext0.addChild(char6);
    CommonToken char7 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char7);
    CommonToken char8 = new CommonToken(JavadocTokenTypes.CHAR, "a");
    textContext0.addChild(char8);
    CommonToken char9 = new CommonToken(JavadocTokenTypes.CHAR, "l");
    textContext0.addChild(char9);
    CommonToken ws4 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws4);
    CommonToken char10 = new CommonToken(JavadocTokenTypes.CHAR, "c");
    textContext0.addChild(char10);
    CommonToken char11 = new CommonToken(JavadocTokenTypes.CHAR, "a");
    textContext0.addChild(char11);
    CommonToken char12 = new CommonToken(JavadocTokenTypes.CHAR, "p");
    textContext0.addChild(char12);
    CommonToken char13 = new CommonToken(JavadocTokenTypes.CHAR, "a");
    textContext0.addChild(char13);
    CommonToken char14 = new CommonToken(JavadocTokenTypes.CHAR, "c");
    textContext0.addChild(char14);
    CommonToken char15 = new CommonToken(JavadocTokenTypes.CHAR, "i");
    textContext0.addChild(char15);
    CommonToken char16 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext0.addChild(char16);
    CommonToken char17 = new CommonToken(JavadocTokenTypes.CHAR, "y");
    textContext0.addChild(char17);
    CommonToken ws5 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws5);
    CommonToken char18 = new CommonToken(JavadocTokenTypes.CHAR, "o");
    textContext0.addChild(char18);
    CommonToken char19 = new CommonToken(JavadocTokenTypes.CHAR, "f");
    textContext0.addChild(char19);
    CommonToken ws6 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws6);
    CommonToken char20 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext0.addChild(char20);
    CommonToken char21 = new CommonToken(JavadocTokenTypes.CHAR, "h");
    textContext0.addChild(char21);
    CommonToken char22 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext0.addChild(char22);
    CommonToken ws7 = new CommonToken(JavadocTokenTypes.WS, " ");
    textContext0.addChild(ws7);
    CommonToken char23 = new CommonToken(JavadocTokenTypes.CHAR, "B");
    textContext0.addChild(char23);
    CommonToken char24 = new CommonToken(JavadocTokenTypes.CHAR, "y");
    textContext0.addChild(char24);
    CommonToken char25 = new CommonToken(JavadocTokenTypes.CHAR, "t");
    textContext0.addChild(char25);
    CommonToken char26 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext0.addChild(char26);
    CommonToken char27 = new CommonToken(JavadocTokenTypes.CHAR, "B");
    textContext0.addChild(char27);
    CommonToken char28 = new CommonToken(JavadocTokenTypes.CHAR, "u");
    textContext0.addChild(char28);
    CommonToken char29 = new CommonToken(JavadocTokenTypes.CHAR, "f");
    textContext0.addChild(char29);
    CommonToken char30 = new CommonToken(JavadocTokenTypes.CHAR, "f");
    textContext0.addChild(char30);
    CommonToken char31 = new CommonToken(JavadocTokenTypes.CHAR, "e");
    textContext0.addChild(char31);
    CommonToken char32 = new CommonToken(JavadocTokenTypes.CHAR, "r");
    textContext0.addChild(char32);
    CommonToken char33 = new CommonToken(JavadocTokenTypes.CHAR, ".");
    textContext0.addChild(char33);
    descriptionContext0.addChild(textContext0);
    javadocTagContext0.addChild(descriptionContext0);
    javadocContext0.addChild(javadocTagContext0);
    CommonToken eof0 = new CommonToken(JavadocTokenTypes.EOF, "<EOF>");
    javadocContext0.addChild(eof0);
    return javadocContext0;
}
Also used : TextContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.TextContext) JavadocContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocContext) JavadocTagContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocTagContext) CommonToken(org.antlr.v4.runtime.CommonToken) DescriptionContext(com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext)

Aggregations

DescriptionContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.DescriptionContext)15 JavadocContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocContext)15 TextContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.TextContext)15 CommonToken (org.antlr.v4.runtime.CommonToken)15 JavadocTagContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocTagContext)12 ReferenceContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.ReferenceContext)7 JavadocInlineTagContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.JavadocInlineTagContext)4 AttributeContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.AttributeContext)3 HtmlElementContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.HtmlElementContext)3 HtmlElementCloseContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.HtmlElementCloseContext)2 HtmlElementOpenContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.HtmlElementOpenContext)2 HtmlTagContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.HtmlTagContext)2 ParametersContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.ParametersContext)2 PTagOpenContext (com.puppycrawl.tools.checkstyle.grammars.javadoc.JavadocParser.PTagOpenContext)1