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,60cf103f8ae4940d X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Status of ayacc and aflex? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <48acd484$0$24596$4d3efbfe@news.sover.net> <9ceb2207-6a3d-407c-84dc-885bfaa07ec1@j22g2000hsf.googlegroups.com> Date: Fri, 22 Aug 2008 14:56:18 +0200 Message-ID: <11ciowcodituu$.y2sm9rev63ug.dlg@40tude.net> NNTP-Posting-Date: 22 Aug 2008 14:56:22 CEST NNTP-Posting-Host: 352c8ca5.newsspool1.arcor-online.net X-Trace: DXC=STk0a2>memZYQ5E:lo4Y[F:kW>`^jmk@<0<^ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7488 Date: 2008-08-22T14:56:22+02:00 List-Id: On Fri, 22 Aug 2008 05:02:43 -0700 (PDT), Ludovic Brenta wrote: > Speaking of lexical analysis and recursive descent parsers, I'd like > to know whether anyone here has tried OpenToken[1] and would like to > comment on it. > > [1] http://www.telepath.com/~dennison/Ted/OpenToken/OpenToken.html I studied it some time ago and found it interesting. In particular, I borrowed the idea of generation of a table from an Ada enumeration type. If a table contains only legal Ada identifiers, it is a very quick way to create it. To the critique of OpenToken. One problem is that it really concentrates on tokens, nothing else. A recursive descent parser should also support higher-level constructs, like user-defined blank/comment, identifier, literals, and more generally expressions. So that, when you see the token "declare", you could tell the parser get me a name, and then after the colon, the declaration expression etc. It also pays too little attention to abstracting the sources being parsed and links to the sources (needed for error messages and integration into IDE). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de