On Tue, 2010-06-22 at 07:42 +0200, Tudor Girba wrote:
Second, every
FAMIXSourcedEntity has a comments attribute. This
seems a
mixed blessing, since the attachment of comments is often ambiguous.
For example, in SAS one might have
data a;
x=34;
/* a very silly example */
data b;
y=1;
It's unclear whether the comment applies to the data a or data b
step.
If you're a parser, it might also apply to
34, x=34, data, or data
b.
I am not sure what the question here is :). Your problem seems to be
related to a convention in the language you are parsing. The same
situation exists in Java for method comments. If we would have your
example, the parser will decide that your comment belongs to the
second method.
The implicit question is whether this framework forces or
encourages
comments to be associated with specific modeled entities. The implicit
comment is that, in the case of code I'm dealing with, there's no way
the parser will be clever enough, or the input regular enough, to make
such association reliably.
Ross