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,f384032a8c47ef0d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!proxad.net!proxad.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: about OpenToken Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <439b6ac7$0$20862$636a55ce@news.free.fr> <439c6eab$0$20191$636a15ce@news.free.fr> Date: Sun, 11 Dec 2005 20:01:36 +0100 Message-ID: <163minks9ygxl$.tww5gn7kaioj.dlg@40tude.net> NNTP-Posting-Date: 11 Dec 2005 20:01:35 MET NNTP-Posting-Host: a2c7a0db.newsread2.arcor-online.net X-Trace: DXC=F9lT9b_YfVh^O_h>VFi7[bQ5U85hF6f;djW\KbG]kaMhn6A=Y6OiEad9m>YO:VGmMoWRXZ37ga[7jjTA67ckJ=XejZ=_d:`Kb On Sun, 11 Dec 2005 19:23:38 +0100, Lionel Draghi wrote: > Dmitry A. Kazakov a �crit : > ... >>>It seems far to complex to be the right way. Any hints? >> Far too simple you mean... > > I expect the code representing the grammar to be almost as simple as the > BNF expression. Well, that depends. Consider comments and line feeds allowed between the keywords. To represent this in BNF, I don't think it will be such simple expression. > If an optionnal word requires a bunch of code, I would say that there's > something to improve. There are many approaches to parsing. I am using table driven parsers. For a descent recursive parser I just change the table to match the source against depending on the context. I presume that something similar can be done with OpenToken as well. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de