It was worth the trip for that.
( It ( ( was ( worth ( ( the trip ) ( for that ) ) ) ) . ) )
(ROOT (S (NP (PRP It)) (VP (VBD was) (ADJP (IN worth) (NP (NP (DT the) (NN trip)) (PP (IN for) (NP (DT that)))))) (. .)))
Someone gained something from it.
( Someone ( ( ( gained something ) ( from it ) ) . ) )
(ROOT (S (NP (NN Someone)) (VP (VBD gained) (NP (NN something)) (PP (IN from) (NP (PRP it)))) (. .)))