I guess we all agree that we would like to have negative floats and
integers in TTCN-3, don't we?
Anyway, as one of my colleagues has just pointed out to me, the BNF
grammar does not allow to express negative number literals.
Here are the relevant productions from the BNF (rev. 11):
IntegerValue ::= Number
FloatValue ::= FloatDotNotation | FloatENotation
FloatDotNotation ::= Number Dot DecimalNumber
FloatENotation ::= Number [Dot DecimalNumber] Exponential [Minus] Number
Number ::= (NonZeroNum {Num}) | 0
NonZeroNum ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
The easist fix in the grammer would be to change these productions as
follows:
IntegerValue ::= [Minus] Number
FloatDotNotation ::= [Minus] Number Dot DecimalNumber
FloatENotation ::= [Minus] Number [Dot DecimalNumber] Exponential
[Minus] Number
I don't have so much overview on the BNF grammar, so that I could say if
this would break things somewhere else, though.
Best regards
Stephan Tobies
--
Stephan Tobies Research Engineer, Nokia Research Center
Mobile Networks Lab, Protocol Engineering Group
E-Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
Work Phone: +49-234-9842262
Address: NRC Bochum, Meesmannstr. 103, 44807 Bochum, Germany