The parentheses are not part of the grammar, but added to show the parses. (((6--)--)-1)==5 ((6--)-(--1))==6 (6-(--(--1)))==7 (6-(--(-(-1))))==6 ((6--)-(-(-1)))==5 (6-(-(-(--1))))==6 (6-(-(-(-(-1)))))==5 (6-(-(--(-1))))==4 #### Length 1, Parse 0, value==(6-1)==5 Length 2, Parse 0, value==(6-(-1))==7 Length 3, Parse 0, value==((6--)-1)==5 Length 3, Parse 1, value==(6-(--1))==6 Length 3, Parse 2, value==(6-(-(-1)))==5