- Revision
- 1116
- Author
- rfscholte
- Date
- 2011-03-14 16:29:22 -0500 (Mon, 14 Mar 2011)
Log Message
Fixed all javadoc tests with new lexer
Modified Paths
- trunk/qdox/src/grammar/commentlexer.flex
- trunk/qdox/src/test/com/thoughtworks/qdox/parser/impl/JFlexCommentLexerTest.java
Diff
Modified: trunk/qdox/src/grammar/commentlexer.flex (1115 => 1116)
--- trunk/qdox/src/grammar/commentlexer.flex 2011-03-14 20:57:37 UTC (rev 1115) +++ trunk/qdox/src/grammar/commentlexer.flex 2011-03-14 21:29:22 UTC (rev 1116) @@ -83,7 +83,7 @@ Eol = \r|\n|\r\n JavadocEnd = "*"+ "/" -%state JAVADOC JAVADOCLINE JAVADOCTAG MULTILINECOMMENT SINGLELINECOMMENT +%state JAVADOC JAVADOCCONTENT JAVADOCLINE JAVADOCTAG MULTILINECOMMENT SINGLELINECOMMENT %% @@ -97,6 +97,7 @@ } "/*" [*]+ { pushState( JAVADOC ); + pushState( JAVADOCCONTENT ); return DefaultJavaCommentParser.JAVADOCSTART; } "/*" { @@ -106,14 +107,6 @@ } <JAVADOC> { - "@" { - yypushback(1); - pushState(JAVADOCTAG); - } - [^ \t\r*@] { - yypushback(1); - pushState(JAVADOCLINE); - } "*"+ [ \t]* / "@" { pushState(JAVADOCTAG); } @@ -125,6 +118,19 @@ return DefaultJavaCommentParser.JAVADOCEND; } } +<JAVADOCCONTENT,JAVADOC> { + [^ \t\r@] { + yypushback(1); + popState(); + pushState(JAVADOCLINE); + } + [ \t\r]* "@" { + yypushback(1); + popState(); + pushState(JAVADOCTAG); + } +} + <JAVADOCLINE> { ~{Eol} { popState();
Modified: trunk/qdox/src/test/com/thoughtworks/qdox/parser/impl/JFlexCommentLexerTest.java (1115 => 1116)
--- trunk/qdox/src/test/com/thoughtworks/qdox/parser/impl/JFlexCommentLexerTest.java 2011-03-14 20:57:37 UTC (rev 1115) +++ trunk/qdox/src/test/com/thoughtworks/qdox/parser/impl/JFlexCommentLexerTest.java 2011-03-14 21:29:22 UTC (rev 1116) @@ -1,11 +1,10 @@ package com.thoughtworks.qdox.parser.impl; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; import java.io.IOException; import java.io.StringReader; -import org.junit.Ignore; import org.junit.Test; public class JFlexCommentLexerTest @@ -129,7 +128,7 @@ lexAssert(0); } - @Ignore + @Test public void testDeepJavadocTag() throws Exception { String in = " /** * *** * @m x \n" + "*/";
To unsubscribe from this list please visit:
