*Hi,*

I am totally new to Antlr C# grammar. I am trying to use the grammar to
extract C# code related metrics like *Halstead *and *Object Oriented
(according to C&K Model). *

I stuck on extracting details as following.


I need to extract *operators *and *operands *from the source code. If you
could please explain bellow scenarios I could be able to overcome the same
(Need to know in which place that I need to catch the detail from the
grammar).

Ex:-

   - * Int x = 1; *

*Answer*

Operators { = }

Operands { int , x, 1 }

 *
*

   - *For( int k = 0; k < 10; k++) { }*

*Answer*

Operators { for(), = , =, ++ }

Operands { int, k, 0, k, 10, k }


*I need to get only the count of these Operators and Operands by
incrementing a variable*. Please be kind enough to help me. Thanks.




*Thanks and Regards,*

*Shirantha Fernando*

*( IT student)*

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to