>I would like to write a parser using bison that deals with fragments>of source code that may or may not be complete. I would like to>construct an AST from the source code using whatever parts exist,>resolving them into more specific structures whenever they match some>pattern.

If I get you right, then you are describing a form of --- as we call
it --- "tolerant parsing". In the following paper, you will find a
kind of overview and lots of references on tolerant parsing:http://homepages.cwi.nl/~ralf/icsm03/