Sun, 18 Apr 1993 20:50:11 GMT

Related articles |
---|

FIRST() algorithm goer@midway.uchicago.edu (1993-04-16) |

Re: FIRST() algorithm mauney@csljon.csl.ncsu.edu (1993-04-18) |

Newsgroups: | comp.compilers |

From: | mauney@csljon.csl.ncsu.edu (Jon Mauney) |

Keywords: | LR(1) |

Organization: | NCSU |

References: | 93-04-063 |

Date: | Sun, 18 Apr 1993 20:50:11 GMT |

goer@midway.uchicago.edu (Richard L. Goerwitz) writes:

*>Perhaps this is not a puzzle for old hands. For me, though, it's*

*>a real conundrum. Where is the breakdown in the following sequence?*

*> 3) FIRST() does not work with left recursive rules, so we must*

*> first convert left recursion to right recursion*

*>Where's the weak link in my reasoning?*

First works fine with left-recursion. First is a set of terminals, and

therefore of finite size; it is easily calculated with an iterative

algorithm.

You are probably thinking of the LL-family use of First to build the

Predict() function, which does have trouble with left-recursion.

--

Jon Mauney mauney@csc.ncsu.edu

Mauney Computer Consulting (919)828-8053

--

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.