Q: How to find out which are the next possible terminals for a CFG?

"Kirill Stoimenov" <stoimenov@dock.net>
1 Apr 2000 14:08:55 -0500

          From comp.compilers

Related articles
Q: How to find out which are the next possible terminals for a CFG? stoimenov@dock.net (Kirill Stoimenov) (2000-04-01)
Q: How to find out which are the next possible terminals for a CFG? uday@cs.unipune.ernet.in (Uday Khedkar) (2000-04-05)
| List of all articles for this month |

From: "Kirill Stoimenov" <stoimenov@dock.net>
Newsgroups: comp.compilers
Date: 1 Apr 2000 14:08:55 -0500
Organization: Posted via Supernews, http://www.supernews.com
Keywords: parse, question

Hi,


I have the following problem: I have a CFG and I need to know for a given
partial phrase, which are the all next possible terminals.


Example:


L := L I
L := I
I := a
I := b


For the phrase ab the possible new phrases are: aba and abb, so the next
possible terminals are {a, b}.


Any restrictions, like LL(1) or LR(1) are fine, I don't need to be general.
Assume, that there are no empty rules to transitions (epsilons) in the
terminal symbols.


Thanks in advance,
Kirill


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.