osate/osate2-core — Issue #26: Requiring a single property value to be a property list
Author: brlarson
Created: 2011-11-13 08:06:28+00:00
State: open

In the following example, property values "classifier(Heart_Rate)" and "30" needed to be placed within parentheses to become property lists to be parsed.

data HeartRateSamples
properties
Data_Model::Data_Representation => Array;
Data_Model::Base_Type => (classifier(Heart_Rate)); --one byte for 0-255 beats per minute
Data_Model::Integer_Range => 0 .. 255;
Data_Model::Dimension => (30); --ICE_Properties::Num_Trending_Samples);
end HeartRateSamples;

I prefer that when either a property_value or property_list is allowed in the grammar, that single-valued lists be disallowed. Then property_list would require at least two elements (contain a comma). I believe this can be parsed unambiguously without semantic information and will eliminate some superfluous parentheses.