  In this paper a Bass-Serre theory in the groupoid setting is developed and a
structure theorem is established. Any groupoid action without inversion of
edges on a forest induces a graph of groupoids, while any graph of groupoids
satisfying certain hypothesis admits a canonical associated groupoid, called
the fundamental groupoid, and a forest, called the Bass-Serre forest, such that
the fundamental groupoid acts on the Bass-Serre forest. The structure theorem
states that these processes are mutually inverse.
