( and ( gas ( ( is ( ( the state ) ( ( in which ) ( matter ( expands ( to ( occupy ( ( the ( ( volume and ) shape ) ) ( of ( its container ) ) ) ) ) ) ) ) ) ) . ) ) )
(ROOT (S (CC and) (NP (NN gas)) (VP (VBZ is) (NP (NP (DT the) (NN state)) (SBAR (WHPP (IN in) (WHNP (WDT which))) (S (NP (NN matter)) (VP (VBZ expands) (S (VP (TO to) (VP (VB occupy) (NP (NP (DT the) (NN volume) (CC and) (NN shape)) (PP (IN of) (NP (PRP$ its) (NN container)))))))))))) (. .)))
and gas is the state in which matter expands to occupy the volume and shape of its container.
(ROOT (S (NP (DT A) (NN gas)) (VP (VBZ assumes) (NP (NP (DT the) (NN shape)) (PP (IN of) (NP (PRP$ its) (NN container))))) (. .)))