LL(1), LR(1), LL(k)

Recommended Posts

Lucidquiet    199
I've been looking at ANTLR, JavaCC, Bison, etc. I'm trying to figure out what the LL means. I think in bison it means left to right with 1 look ahead token. But then what does LL mean. And I think the LL(k) mean k number of lookahead tokens, but I could be wrong. Does anyone know? L-

Share on other sites
Fruny    1658
Quote:
 Wikipedia on LR parsersIn computer science, an LR parser is a type of bottom-up parser for context-free grammars that is very commonly used by computer programming language compilers (and other associated tools). LR parsers read their input from Left to right and produce a Rightmost derivation (hence LR, compare with LL parser). The term "LR(k) parser" is also used; here the k refers to the number of unconsumed "look ahead" input symbols that are used in making parsing decisions. Usually k is 1 and is often omitted. A context-free grammar is called LR(k) if there exists a LR(k) parser for it.

Share on other sites
Lucidquiet    199
Uh right -- wikipedia -- forgot to look there.!