anuragraghavan / franca

Automatically exported from code.google.com/p/franca
0 stars 0 forks source link

validation of enumeration constant values too relaxed #135

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
if defining an enumeration with constant values in Franca 0.9.1, the validation 
does not complain even in obviously inappropriate cases.
Example:
enumeration MyEnum {
   OK = 42
   WARNING = "47"   // Franca warning raised
   OK2 = 0b00001111 // binary value is numeric, no warning
   OK3 = 0x47           // hex value is numeric, no warning
   ERROR1 = 0xK47       // ERROR not really a hex value, no warning/error!!!
   ERROR2 = 0b3335555   // ERROR not really a binary value, no warning/error!!!
}

It would be expected that Franca validation raises errors if invalid values are 
provided, e.g. 0b3335555 or 0xK47.

Original issue reported on code.google.com by manfred....@bmw.de on 23 Feb 2015 at 12:42