help-bison
[Top][All Lists]
Advanced

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

Re: QUESTION: what does LR(0) mean? and what's behind the name LR0.c ?


From: John Levine
Subject: Re: QUESTION: what does LR(0) mean? and what's behind the name LR0.c ?
Date: 6 Oct 2014 17:37:12 -0000

In article <address@hidden> you write:
>Hi, I'm going through the bison code, and I'm curious as to the name of the 
>source code file LR0.c .
>
>Seems like this file creates the states.  After they are created, the first 
>state is at state 0.

You might want to read up on LR parsing. LR(0) langauges are the ones
that can be parsed with no lookahead, i.e. zero tokens.  Ordinary
bison parsers are LR(1) which, to greatly oversimplify, does LR(0)
parsing where it can, and looks one token ahead where it can't.

The Wikipedia article is a reasonable place to start, and the topic is
covered in all modern compiler textbooks.

R's,
John



reply via email to

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