Feature Requests: Browse | Submit New | Admin

[#918] Support for count operator

Date:
2004-09-27 03:14
Priority:
1
Submitted By:
Charles Mills (cmills)
Assigned To:
Nobody (None)
Category:
OCL Parser
State:
Open
Summary:
Support for count operator

Detailed description
Add support for count iterating operator.
Example
'count (long i in 0...arr->len | arr->ptr[i] >= 0) == arr->len / 2'

This would probably entail changing 'exists' and 'forall' to the following (parentheses required)
'exists (long i in 0...arr->len | arr->ptr[i] >= 0)'
'forall (long i in 0...arr->len | arr->ptr[i] >= 0)'
That would remove all shift/reduce conflicts from the OCL parser.  Not sure if this is worth doing though.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item