From: Stephen Leake <stephen_leake@acm.org>
Subject: Re: about OpenToken
Date: Sun, 11 Dec 2005 08:14:30 -0500
Date: 2005-12-11T08:14:30-05:00 [thread overview]
Message-ID: <ud5k3pyh5.fsf@acm.org> (raw)
In-Reply-To: 439b6ac7$0$20862$636a55ce@news.free.fr
Lionel Draghi <Lionel.nospam.Draghi@Ada-France.org> writes:
> Is 3.0b the latest available OpenToken version?
I'm using a version of OpenToken that I have patched and enhanced. I'm
no longer sure what version I got originally, but since the OpenToken
website is dated 9/6/00, it's quite probable I started with 3.0b.
Perhaps if there is enough interest, we should start a SourceForge project.
> I'am not so sure, because some of the examples don't compile using
> gnat 4.0.3 (Debian 4.0.2-4).
I have not tried that yet, but I am using GNAT 5.03a.
What sorts of errors are you getting? Perhaps it's one of the Ada 2006
features that is incompatible with Ada 95 (like the 'interface' keyword).
> Here is my problem : I am implementing a recursive descent parser, and
> my grammar contains optionnals keywords, that will be ignored.
> Here is an exemple:
> - do this and this
> - do this and also this
> "also" is an optionnal keyword.
>
> I am wondering what is the best way to deal with this.
> What comes to my mind is to create a selection (In OpenToken parlance)
> between the keyword "also" and a null token, child of the abstract
> "Recognizer.Nothing" token.
I'm not using recursive descent, but I did play with selections and
couldn't get them to work. So I just code all variants of the syntax:
Grammar : constant Production_List.Instance :=
Tokens.Statement <= Go_Statement and
Go_Statement <= -- go;
Nonterminal.Get (Go_ID) + Execute_Action and
Go_Statement <= -- go sync;
Nonterminal.Get (Go_ID) & Nonterminal.Get (Sync_ID) + Execute_Action and
Go_Statement <= -- go count;
Nonterminal.Get (Go_ID) & Tokens.Integer + Execute_Action and
Go_Statement <= -- go hardware;
Nonterminal.Get (Go_ID) & Nonterminal.Get (Hardware_ID) + Execute_Action and
Go_Statement <= -- go hardware sync;
Nonterminal.Get (Go_ID) & Nonterminal.Get (Hardware_ID) & Nonterminal.Get (Sync_ID) + Execute_Action and
Go_Statement <= -- go hardware count;
Nonterminal.Get (Go_ID) & Nonterminal.Get (Hardware_ID) & Tokens.Integer + Execute_Action;
> PS : and once more question : is there still a mail list for OpenToken
> on AdaPower site? (I would like to have a look at the archive)
The only things about OpenToken I found on AdaPower point to the
OpenToken web site.
--
-- Stephe
next prev parent reply other threads:[~2005-12-11 13:14 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 [this message]
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
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