Re: Algorithm for computing first-k follow-k sets

"Felipe Angriman" <felipeangriman@gmail.com>
Tue, 26 Aug 2008 11:40:54 -0300

          From comp.compilers

Related articles
Algorithm for computing first-k follow-k sets cartercheng@gmail.com (Carter Cheng) (2008-08-23)
Re: Algorithm for computing first-k follow-k sets DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-08-24)
Re: Algorithm for computing first-k follow-k sets felipeangriman@gmail.com (Felipe Angriman) (2008-08-24)
Re: Algorithm for computing first-k follow-k sets cppljevans@suddenlink.net (Larry Evans) (2008-08-25)
Re: Algorithm for computing first-k follow-k sets felipeangriman@gmail.com (Felipe Angriman) (2008-08-26)
| List of all articles for this month |

From: "Felipe Angriman" <felipeangriman@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 26 Aug 2008 11:40:54 -0300
Organization: Compilers Central
References: 08-08-049 08-08-055
Keywords: parse
Posted-Date: 26 Aug 2008 23:33:09 EDT

> Page 1 of that pdf uses notation:
>
> k:alpha beta
>
> without defining what : means. My first guess is that it
> takes the first k elements of an A^* if they exist; however,
> that's not clear. Mr. Choe probably defines : in his
> class room and say no need to repeat it on the .pdf.


This notation is defined in Terrence Parr PhD Thesis Page 5 that why
it isn't defined here
http://plus.kaist.ac.kr/~choe/cs522/cs522/pdf/5par-SLL(k).pdf


>>
>> but I THINK that the algorithm does not work on left-recursive
>> grammars (note: i haven't tried it)


>Page 5 of that pdf says G (I guess a grammar)
>is not LL(k) if G is left-recursive. so, I guess the
>algorithm does not work on left-recursive grammars.


My comment regarding the applicability of the algorithm to Left
Recursive Grammars is because Carter never said he wanted to compute
tables for LL(k) Grammars (which might be the most fitting supposition
since this is a compiler discussion list). However, if i consider the
request made by carter as is, i was compelled to answer in the manner
i did before.


Regards,


Post a followup to this message

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