Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2004-12-24 08:42:22

On 12/24/2004 12:13 AM, christopher diggins wrote:
> I would not say YARD is a better parser than Spirit, it is designed with
> quite different goals. YARD is designed to be compact and flexible.
> Concerning "first/follow set kind of things" I am not sure what you
> mean.

They're used to determine the next non-terminal to parse by looking
ahead 1 terminal symbol (for LL[1] parser).

Informally, they're defined for each non-terminal in the language.
For a non-terminal, N, FIRST(N) is the set of non-terminals which
can start a sentence derived from N. Similarly, FOLLOW(N), is
the set that can follow that sentence. For a formal definition,
see the paper:

   A Strong LL(k) Parser Generator That Accepts Non-LL Grammars
   and Generates LL(1) Tables: Extended Abstract

available at:

for an implementation, see:

actually, that's been replaced by one more in line with spirit (more
meta-programming). I could upload it to the sandbox if you're

Boost list run by bdawes at, gregod at, cpdaniel at, john at