From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ucla-cs!zen!ucbvax!MITRE-BEDFORD.ARPA!emery From: emery@MITRE-BEDFORD.ARPA (Emery) Newsgroups: comp.lang.ada Subject: lexical question Message-ID: <8709190147.AA28027@mitre-bedford.ARPA> Date: Fri, 18-Sep-87 21:47:17 EDT Article-I.D.: mitre-be.8709190147.AA28027 Posted: Fri Sep 18 21:47:17 1987 Date-Received: Sun, 20-Sep-87 07:01:21 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: 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