comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!news.sei.cmu.edu!firth@ucbvax.Berkeley.EDU  (Robert Fi
Subject: Re: Help with Meridian compiler, please
Date: 5 Feb 93 17:04:25 GMT	[thread overview]
Message-ID: <1993Feb5.120425.19613@sei.cmu.edu> (raw)

In article <EACHUS.93Feb5103840@dr_no.mitre.org> eachus@dr_no.mitre.org (Robert
 I. Eachus) writes:

>    A: Natural range 0..2:=0;
>
>    The reason Meridan trips up (and yes it is a compiler bug) is
>probably that 2:1101: is a legal numeric literal (with a decimal value
>of 13).

I think you're right.  This situation requires a two-character lookahead,
which is a problem with some scanners, especially machine-generated ones.
Also, unlike the almost-ambiguous 'X (attribute or character literal?),
the left syntactic context is no help.

The solution, of course, is to do the two-character lookahead.  My own
disgusting hack, on finding "2:=", is to put back just one character, a
synthetic lexical token that means ":=", and then we're back in sync.

Odd, though, that it should fail on the colon, having already solved
the identical problem of distinguishing between a range starting "0."
and a real constant starting "0.".

             reply	other threads:[~1993-02-05 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-02-05 17:04 cis.ohio-state.edu!news.sei.cmu.edu!firth [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-02-06 23:24 Help with Meridian compiler, please darwin.sura.net!sgiblab!news.cs.indiana.edu!arizona.edu!east.pima.edu!rha
1993-02-05 15:38 Robert I. Eachus
1993-02-04 14:42 Angel Alvarez
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox