svn commit: r13910 - trunk/src_new/org/argouml/uml/reveng/java/java.g
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tfmorris
Date: 2007-12-11 15:25:20-0800
New Revision: 13910
Modified:
trunk/src_new/org/argouml/uml/reveng/java/java.g
Log:
Issue 2879: Add a new rule to deal with /**/ comments
Modified: trunk/src_new/org/argouml/uml/reveng/java/java.g
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/reveng/java/java.g?view=diff&rev=13910&p1=trunk/src_new/org/argouml/uml/reveng/java/java.g&p2=trunk/src_new/org/argouml/uml/reveng/java/java.g&r1=13909&r2=13910
==============================================================================
--- trunk/src_new/org/argouml/uml/reveng/java/java.g (original)
+++ trunk/src_new/org/argouml/uml/reveng/java/java.g 2007-12-11 15:25:20-0800
@@ -237,7 +237,7 @@
STATIC_IMPORT; ENUM_DEF; ENUM_CONSTANT_DEF; FOR_EACH_CLAUSE; ANNOTATION_DEF; ANNOTATIONS;
ANNOTATION; ANNOTATION_MEMBER_VALUE_PAIR; ANNOTATION_FIELD_DEF; ANNOTATION_ARRAY_INIT;
TYPE_ARGUMENTS; TYPE_ARGUMENT; TYPE_PARAMETERS; TYPE_PARAMETER; WILDCARD_TYPE;
- TYPE_UPPER_BOUNDS; TYPE_LOWER_BOUNDS;
+ TYPE_UPPER_BOUNDS; TYPE_LOWER_BOUNDS; EMPTY_COMMENT="/**/";
}
{
@@ -2045,9 +2045,26 @@
$setType(Token.SKIP); if (nl) newline(); }
;
+// Empty comment block needs to be distinguished from Javadoc
+EMPTY_COMMENT
+ : "/**/"
+ { addWhitespace($getText);
+ $setType(Token.SKIP);}
+ ;
+
// javadoc comments
JAVADOC
: "/**"
+ ( /* Do not allow '/' for first character */
+ options {
+ generateAmbigWarnings=false;
+ }
+ :
+ '\r' '\n' {newline();}
+ | '\r' {newline();}
+ | '\n' {newline();}
+ | ~('/'|'\n'|'\r')
+ )
( /* '\r' '\n' can be matched in one alternative or by matching
'\r' in one iteration and '\n' in another. I am trying to
handle any flavor of newline that comes in, but the language