( ( ( A gram ) ( of ( ( carbohydrate or ) ( of protein ) ) ) ) ( ( has ( ( only four ) calories ) ) . ) )
(ROOT (S (NP (NP (DT A) (NN gram)) (PP (IN of) (UCP (ADJP (JJ carbohydrate)) (CC or) (PP (IN of) (NP (NN protein)))))) (VP (VBZ has) (NP (QP (RB only) (CD four)) (NNS calories))) (. .)))
A gram of carbohydrate or of protein has only four calories.
(ROOT (S (NP (NP (CD One) (NN gram)) (PP (IN of) (NP (NNS carbohydrates)))) (VP (VBZ provides) (NP (NP (CD four) (NNS calories)) (PP (IN of) (NP (NN energy))))) (. .)))