[comp.lang.ada] 1:= syntax error

Robert.Firth@SEI.CMU.EDU (09/22/87)

The problems with "1:=" generating an error can be traced to
[RM 2.4.2 - Based Literals] and [RM 2.10 - Allowable Replacements of
Characters].

The compiler believes that the sequence "1:" introduces a based literal,
for instance "1:0123:".  Accordingly, it fails on the "=" character,
which cannot be part of a based literal.

Recall that, while based literals are usually written "2#1010#", the
colon is an allowable replacement for the hachure.  You should expect
various error messages, such as "illegal char in based literal",
"invalid base in based literal", and so on.

This lexis is correct according to the RM - indeed, any alternative
would no longer be LR(1) and so would cause trouble for automatic
scanner generators.  And the colon is a replacement character because
Steelman required that Ada be representable using a 56-character set.

Sigh.