Subject: Hex versus Decimal Numbers

From: Jon Steer <[email-masked]>
Date: Fri, 29 Oct 1999 14:20:17 -0400

The MEGACO grammar designers have gone to fair lengths to
make sure that most ambiguous token sequences have reasonable
starting and terminating markers (such as "<" ">" and "[" "]" in
  domainName and domainAddress).
These markers allow simple regex lexers to work fairly well without
having to have a large amount of contextual information.

I believe that it would make parsing for numeric numbers
easier if the SecurityParamIndex, SequenceNum and AuthData
tokens in the ABNF were defined to be hex strings prefixed
with "0x".

As it stands now, lexer's have to have context knowledge
to understand that the aforementioned numbers are hex
and not decimal.

The lexers would know that anything beginning
with a digit is a numeric value and any token having no "x" in it
is a decimal number.

This change would follow standard language compilation rules.
There is no language that I know of that makes the compiler
guess what kind of number something is contextually.

This small change could greatly simplify 1st pass lexers.

I think that this change would also enhance human-readability
of the message.

  thanks,
  jon

---

From: Brian Rosen <[email-masked]>
Date: Fri, 29 Oct 1999 15:14:35 -0400

I think you are correct, and we should make this change.

Brian

> -----Original Message-----
> From: Jon Steer [mailto:[email-masked]]
> Sent: Friday, October 29, 1999 2:20 PM
> To: [email-masked]
> Subject: Hex versus Decimal Numbers
>
>