adl / hoaf

Hanoi Omega-Automata Format
14 stars 2 forks source link

positive integers starting with 0 #10

Closed strejcek closed 10 years ago

strejcek commented 10 years ago

The current definition allows to write integers like 01 or 007. Do we care about the zeros or not. For example, has "Start: 007" the same meaning as "Start: 7"? We should make a comment about this anyway, I guess.

adl commented 10 years ago

I'd definitively not support octal (which is what comes to mind when I read 012) or hexadecimal. I think the text already states that INT is interpreted in base 10.

So we could add a sentence stating the leading zeros are ignored (meaning that 012 = 12), or we could change the definition of INT to 0|[1-9][0-9]* to disallow such superfluous zeros.

I have a slight preference for the latter option, so that if any implementation decides to interpret the state number as a string, it will always have a unique representation.

What do you think?

strejcek commented 10 years ago

I also prefer the latter solution.

adl commented 10 years ago

Done.