comp.lang.ada
 help / color / mirror / Atom feed
From: emery@MITRE-BEDFORD.ARPA (Emery)
Subject: lexical question
Date: Fri, 18-Sep-87 21:47:17 EDT	[thread overview]
Date: Fri Sep 18 21:47:17 1987
Message-ID: <8709190147.AA28027@mitre-bedford.ARPA> (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

             reply	other threads:[~1987-09-19  1:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-09-19  1:47 Emery [this message]
     [not found] <28027@mitre-bedford.ARPA>
1987-09-21 21:31 ` lexical question stt
  -- strict thread matches above, loose matches on Subject: below --
1987-09-22 16:50 Mike Feldman
replies disabled

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