[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding out when a token is consumed

From: Frank Heckenbach
Subject: Re: Finding out when a token is consumed
Date: Sat, 10 May 2003 14:37:12 +0200

Hans Aberg wrote:

> The problem is that you do not provide sufficiently detailed language
> information that it can be resolved from where I stand. Perhaps you knock
> on an increased lookahead, perhaps there is another problem.

In my `t1.y' example in a previous mail (BTW, did you see the
attachments, or does the mailing list cut them off or something?),
there were already 2 R/R conflicts with a very simple grammar.

I haven't tried it with a real grammar (it would be a lot of work,
inserting the `dir' nonterminals and renumbering many `$'s; since I
don't see a chance of it actually working, I'd rather not try it).

> If the needed
> lookahead increase, LALR(1)/LR(1) and such will leave you out in the cold.

Indeed, if the original grammar is LALR(1) (and it definitely needs
the one token look-ahead in various places), it would seem logical
that with the directives thrown in it will require a look-ahead of
two tokens.

> Can directives be followed in sequence without any other tokens?

Yes, but it would be easy to collapse them into a single one at lex
time, so that's not really a problem.


Frank Heckenbach, address@hidden
GnuPG and PGP keys: (7977168E)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]