comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@acm.org>
Subject: Re: about OpenToken
Date: Sun, 11 Dec 2005 15:49:54 -0500
Date: 2005-12-11T15:49:54-05:00	[thread overview]
Message-ID: <u1x0jnytp.fsf@acm.org> (raw)
In-Reply-To: 439c7405$0$28020$626a14ce@news.free.fr

Lionel Draghi <Lionel.nospam.Draghi@Ada-France.org> 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



  reply	other threads:[~2005-12-11 20:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-10 23:54 about OpenToken Lionel Draghi
2005-12-11 11:00 ` Dmitry A. Kazakov
2005-12-11 18:23   ` Lionel Draghi
2005-12-11 19:01     ` Dmitry A. Kazakov
2005-12-11 20:35       ` Stephen Leake
2005-12-11 23:01       ` Lionel Draghi
2005-12-12 13:18         ` Dmitry A. Kazakov
2005-12-12 14:39         ` Marc A. Criley
2005-12-12 23:25           ` Lionel Draghi
2005-12-11 13:14 ` Stephen Leake
2005-12-11 18:11   ` about OpenToken example compilation error Lionel Draghi
2005-12-11 20:56     ` Stephen Leake
2005-12-11 23:04       ` Lionel Draghi
2005-12-11 18:41   ` about OpenToken Lionel Draghi
2005-12-11 20:49     ` Stephen Leake [this message]
2005-12-12 19:04       ` Martin Krischik
2005-12-12 21:35       ` qun-ying
2005-12-12 22:39         ` Ludovic Brenta
2005-12-13  6:19         ` christoph.grein
2005-12-13  0:01     ` Lionel Draghi
2005-12-13  2:58       ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox