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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!newsread.com!news-xfer.newsread.com!nntp.abs.net!news.abs.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: about OpenToken References: <439b6ac7$0$20862$636a55ce@news.free.fr> <439c7405$0$28020$626a14ce@news.free.fr> From: Stephen Leake Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:T25z73JBuAMvCUbQNhm7RYKRBxU= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sun, 11 Dec 2005 15:49:54 -0500 NNTP-Posting-Host: 66.159.65.1 X-Complaints-To: abuse@toad.net X-Trace: news.abs.net 1134334196 66.159.65.1 (Sun, 11 Dec 2005 15:49:56 EST) NNTP-Posting-Date: Sun, 11 Dec 2005 15:49:56 EST Xref: g2news1.google.com comp.lang.ada:6838 Date: 2005-12-11T15:49:54-05:00 List-Id: Lionel Draghi writes: > Stephen Leake a �crit : >> Perhaps if there is enough interest, we should start a SourceForge >> project. > > That's a good idea, at least to start from your up-to-date sources. We need interest from more than two people to make it worth setting up on SourceForge. I can email you my sources if you'd like. > For the future, it may be interesting to compare OpenToken with > similar library like ANTLR (http://www.antlr.org/). I just took a peek at ANTLR. It is similar to YACC, in that it is a pre-processor; it generates Java, C#, C++, or Python code that then does the actual parsing (note Ada is missing; it could presumably be added). It appears to be written in C++ (I haven't downloaded the full source). It has a BSD license. > Is OpenToken a good basis, and is it worth the time, or is it better > to interface with another existing library? OpenToken takes a different approach. The parse table is built at run-time; there is no pre-processor generated code. This makes it easier to use, if less efficient at run time. For example, one pass with gnatmake is sufficient to find all compilation errors; you don't have to build makefiles to keep track of the pre-processor sources. This also makes it possible to modify the language parsed based on startup parameters; I don't do that, but it seems an interesting idea. It would probably be possible to dump the parse table and reload it, to save the time it takes to build it. In my projects, that's not worth the trouble. OpenToken is also fully object-oriented; the run-time parser dispatches to the various actions. That also makes it easier to use. OpenToken is written in Ada, and has the GMGPL license. I'm not sure if OpenToken has the "latest LL(k)" grammar generator algorithms, as ANTLR claims. So far, it's good enough for my projects. And since it's in Ada, I can fix it :). I'll stick with OpenToken. -- -- Stephe