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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8143b93889fe9472 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.78.36 with SMTP id y4mr1294031wiw.1.1359539306208; Wed, 30 Jan 2013 01:48:26 -0800 (PST) X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.116.97 Path: i11ni28890wiw.0!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!nntpfeed.proxad.net!dedibox.gegeweb.org!gegeweb.eu!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada standard and maximum line lengths Date: Wed, 30 Jan 2013 10:49:29 +0100 Organization: cbb software GmbH Message-ID: <115ytn2r5nvqf$.11fx46ufzkxhn.dlg@40tude.net> References: <8dfcf819-e1d0-4578-a795-a4bf724b5014@googlegroups.com> <80a5c765-e5ff-4e7d-bc1b-e35f92a710a7@googlegroups.com> <15vb0qqqhjfhw.1oh0ihxfbhw5a.dlg@40tude.net> <8e359168-9f18-437c-8188-6d1bd85ebed6@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-01-30T10:49:29+01:00 List-Id: On Tue, 29 Jan 2013 19:22:44 -0800 (PST), Lucretia wrote: > I will have multiple representations, but that will be mainly due to > character types, i.e. utf-8, wide, etc. Make source-to-parser interface UTF-8. Wide-I/O backend would convert to UTF-8. > But if the tokens are not copied into the AST but a token is a record > consisting of a start and end position within the buffer then it cannot be > a file, the whole thing has to be read into memory at the start, i.e. > before scanning. Tokens here are operators/statements = enumeration type. In the AST you need only three entities: some enumeration type (in the branches), identifiers and literals (in the leaves). Here is a sample of Ada 95 expressions parser (to AST): http://www.dmitry-kazakov.de/ada/components.htm#12.9 -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de