> Le 6 oct. 2014 à 19:37, John Levine <jo...@iecc.com> a écrit : > > In article <1412583978.11745.yahoomailba...@web126104.mail.ne1.yahoo.com> 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)
FWIW, you meant LALR(1) here, not LR(1). > 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. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison