Elsewhere, "@tef" started
a
discussion about parsing Ruby, and Marpa came up. @tef (expressing
skepticism re Marpa) made an excellent point -- that if I was using the
usual methods for tree building, my claims of linear time for large
classes of ambiguous grammars are only true in a technical sense. That
is, I may "recognize" a parse in O(n), but building the parse forest
may take O(n^2) time or worse.
In fact, Marpa's bocage uses binarized trees and reuses nodes, so when
Marpa's recognition is linear, its tree building is as well. Building
Marpa's bocage is linear in the size of the recognizer's tables, so
whatever time/space complexity you see in the recognizer, that's what
you get out of the bocage.
At roughly the same time I was developing the parse "bocage", Elisabeth
Scott was publishing articles about SPPF's, which do the same job. I
did not read Scott's excellent articles until a couple of years after I
developed the parse bocage. The two techniques are extremely similar.
I've never bothered looking up dates, but my guess is that E. Scott's
work precedes mine. I hope I may be allowed to assert, however, that I
believe that "bocage" is a much nicer name for the concept than SPPF.