Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster dev » Store comments on model
Store comments on model [message #504891] Wed, 23 December 2009 11:33
majid  is currently offline majid
Messages: 72
Registered: November 2009
Member
Hello,

I use this example of grammar and I add comments like this:

Model :
(imports+=Import)*
(elements+=Type)*;

Import :
'import' importURI=STRING;

Type:
DataType | Class;

DataType:
'datatype' name=ID ';'?;

Class :
'class' name=ID ('extends' superClass=[Class])? '{'
properties+=Property*
'}';

Property:
Attribute | Reference;

Attribute:
'attr' name=ID ':' type=[DataType] ';'?;

Reference:
'ref' name=ID ':' type=[Class] ';'?;

terminal ML_COMMENT : 'COMMENTAIRE' !('\n'|'\r')* ('\r'? '\n')? ;

but when serializing i leave comments (that's normal).

I would like to store comments on model for each element defined in my grammar.

Is there a better way to make this?

Thanks

[Updated on: Wed, 23 December 2009 06:51]

Report message to a moderator

Previous Topic:Eclipse Con 2010 talks submitted
Next Topic:[buckminster-dev] Fwd: Problem with Checkstyle Feature
Goto Forum:
  


Current Time: Wed Oct 22 12:14:29 GMT 2014

Powered by FUDForum. Page generated in 0.02617 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software