Re: FIRST() algorithm (Jon Mauney)
Sun, 18 Apr 1993 20:50:11 GMT

          From comp.compilers

Related articles
FIRST() algorithm (1993-04-16)
Re: FIRST() algorithm (1993-04-18)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Jon Mauney)
Keywords: LR(1)
Organization: NCSU
References: 93-04-063
Date: Sun, 18 Apr 1993 20:50:11 GMT (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

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 Computer Consulting (919)828-8053

Post a followup to this message

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