Closed GoogleCodeExporter closed 9 years ago
Original comment by PedroAug...@gmail.com
on 17 Jun 2014 at 4:31
Cause:
interface A {
//comment
isA B;
}
The above code is being parsed as:
[ROOT:][interfaceDefinition][name:A][interfaceMemberDeclaration][extraCode://com
ment isA B;]
This means that the grammar rules that define the structure of an interface
body are not considering the situation when it constains comments. When this
case occurs, any code after a comment is seem as extra code, consequently it is
not parsable by Umple.
Solution:
By changing the grammar from
interfaceMemberDeclaration : [[constantDeclaration]] |
[[constantDeclarationDeprecated]] | [[abstractMethodDeclaration]] |
[[position]] | [[displayColor]] | [[isA]] | [[extraCode]]
to
interfaceMemberDeclaration : [[comment]] | [[constantDeclaration]] |
[[constantDeclarationDeprecated]] | [[abstractMethodDeclaration]] |
[[position]] | [[displayColor]] | [[isA]] | [[extraCode]]
The parser will be able to, correctly, identify the comments inside an
interface body and form a root token.
Original comment by PedroAug...@gmail.com
on 19 Jun 2014 at 6:41
Attached are the patch and issue summary.
Original comment by PedroAug...@gmail.com
on 20 Jun 2014 at 4:56
Attachments:
Original comment by TimothyCLethbridge
on 5 Aug 2014 at 7:03
Original issue reported on code.google.com by
CraigBry...@gmail.com
on 12 Jun 2014 at 4:13