From: Stephen Leake <stephen_leake@acm.org>
Subject: Re: about OpenToken
Date: Sun, 11 Dec 2005 15:35:08 -0500
Date: 2005-12-11T15:35:08-05:00 [thread overview]
Message-ID: <u64pvnzib.fsf@acm.org> (raw)
In-Reply-To: 163minks9ygxl$.tww5gn7kaioj.dlg@40tude.net
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> On Sun, 11 Dec 2005 19:23:38 +0100, Lionel Draghi wrote:
>
>> 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.
OpenToken does comments and white space in the lexer level, not the
grammar level.
I don't think you can define a keyword as whitespace, but it's an
interesting idea.
>> 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.
Yes, you can.
--
-- Stephe
next prev parent reply other threads:[~2005-12-11 20:35 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 [this message]
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
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