help-bison
[Top][All Lists]
Advanced

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

Re: Token sequences


From: Carl Cerecke
Subject: Re: Token sequences
Date: Thu, 15 May 2003 14:36:23 +1200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Frank Heckenbach wrote:
Is there some way (using Bison, Bison's verbose output and/or
additional tools) to find out whether some given sequence of tokens
can occur in the language defined by a given grammar)?

Ideally, such a tool would construct an input sentence that contains
this sequence, but that's not so important for me. Actually I'm more
interested in the negative answers -- confirming my assumption that
some sequences do not occur to get a better understanding of a given
grammar.

(E.g., the sequence `+', `*' does not occur in arithmetic
expressions, but it does in C because of the several meanings of
`*'.)

You could try the paper:

"Recognizing Substrings of LR(k) Languages in Linear Time"
by Joseph Bates and Alon Lavie.
ACM Transactions on Programming Languages and Systems
1994
Vol. 16, No. 4, p 1051-1077

Cheers,
Carl.





reply via email to

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