|Problem with Terminal rule INT in generator [message #757679]
||Mon, 21 November 2011 04:04
Registered: November 2011
I have a little Problem with my grammar and my generator. Maybe anyone of you knows a solution for this.
In my grammar I defined an optional int property:
Now I like to check in my generator if the value is set or not. Int is a primitive Java type and cannot be null (only references can be). So the the property gets the default value 0 and I can do the following check in:
«IF (c.properties.weightX != 0)»
My Problem with this check is that my property can't have the value 0 and this should be allowed. Is there any Solution for this? Is there any possibility that my generator uses Integer instead of int?
Powered by FUDForum
. Page generated in 0.04108 seconds