comp.lang.ada
 help / color / mirror / Atom feed
* Re: lexical question
@ 1987-09-22 16:50 Mike Feldman
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Feldman @ 1987-09-22 16:50 UTC (permalink / raw)


Regarding your strange little program, Meridian gives the following:

line 3 <<error>> illegal base in numeric literal.

I will try some other compilers later.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* lexical question
@ 1987-09-19  1:47 Emery
  0 siblings, 0 replies; 3+ messages in thread
From: Emery @ 1987-09-19  1:47 UTC (permalink / raw)


Here's a real ada-guru question:  
Is the following program (syntactically) legal?
  package demo is
    max_val : constant := 15;
    -- check the next declaration out carefully...
    foo : integer range 1 .. max_val +1:= 15;
    -- some compilers complain right  ^ there, and say that 1: is not
    -- a legal literal, and then i get all kind of errors...
  end demo;
It's obvious from reading the program what is meant, but must a 
parser be able to determine that +1: breaks down to 3 tokens, "+", "1" 
and ":="?

				dave emery
				emery@mitre-bedford.arpa

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1987-09-22 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <28027@mitre-bedford.ARPA>
1987-09-21 21:31 ` lexical question stt
1987-09-22 16:50 Mike Feldman
  -- strict thread matches above, loose matches on Subject: below --
1987-09-19  1:47 Emery

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