We construct generating trees with one, two, and three labels for some
classes of permutations avoiding generalized patterns of length 3 and 4. These
trees are built by adding at each level an entry to the right end of the
permutation, which allows us to incorporate the adjacency condition about some
entries in an occurrence of a generalized pattern. We use these trees to find
functional equations for the generating functions enumerating these classes of
permutations with respect to different parameters. In several cases we solve
them using the kernel method and some ideas of Bousquet-M\'elou. We obtain
refinements of known enumerative results and find new ones.Comment: 17 pages, to appear in Ann. Com