comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: OpenToken: Handling the empty word token
Date: Tue, 31 Jan 2012 10:09:37 +0100
Date: 2012-01-31T10:09:37+01:00	[thread overview]
Message-ID: <4f27afd1$0$6633$9b4e6d93@newsspool2.arcor-online.net> (raw)
In-Reply-To: <jg7e89$27p$1@munin.nbi.dk>

On 31.01.12 01:56, Randy Brukardt wrote:
> "Stephen Leake"<stephen_leake@stephe-leake.org>  wrote in message
> news:82ehuibdwt.fsf@stephe-leake.org...
>> "Randy Brukardt"<randy@rrsoftware.com>  writes:
> ...
>>> I'd be surprised if OpenToken didn't have something similar;
>>
>> Not quite. Because OpenToken uses Ada types to build the grammar, we
>> need an explicit Epsilon token (full code below):
>
> I see. It appears that OpenToken uses an LL-derived parsing scheme. (It
> appears to be a version of recursive descent, which is an LL scheme.] And
> it's important to note that LL parsing cannot include epsilon tokens and
> have problems with left-recursion.

LL parsing can include empty words. But then, the grammar might
be such that predicting the next rule via FIRST and FOLLOW sets
does not lead to a single result. (In which case one could say
"cannot parse" or boldly move on and pick a production, try it,
and if it fails, try the next, I should think.) No guarantees.



  reply	other threads:[~2012-01-31  9:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 16:22 OpenToken: Handling the empty word token mtrenkmann
2012-01-27 16:48 ` Dmitry A. Kazakov
2012-01-28  3:42   ` Randy Brukardt
2012-01-29 17:45     ` Stephen Leake
2012-01-31  0:56       ` Randy Brukardt
2012-01-31  9:09         ` Georg Bauhaus [this message]
2012-01-31 12:16         ` Stephen Leake
2012-02-02  1:39           ` Randy Brukardt
2012-01-28 10:46 ` Stephen Leake
2012-01-30 16:28   ` mtrenkmann
2012-01-30 18:34     ` Dmitry A. Kazakov
2012-01-31 12:58     ` Stephen Leake
replies disabled

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