However, because curTripleTerm is reset to <<(:s2 :p2 :o2)>> when parsing the inner reified triple, it forgets the original <<(:s :p :o)>> when it gets to ~:r2. The same thing can happen with annotations. this would result in the following incorrect output:
Consider the following:
This is intended to be the same as the following N-Triples:
However, because
curTripleTerm
is reset to<<(:s2 :p2 :o2)>>
when parsing the inner reified triple, it forgets the original<<(:s :p :o)>>
when it gets to~:r2
. The same thing can happen with annotations. this would result in the following incorrect output:Instead, productions need to save and restore the value of
curTripleTerm
on entry and exit toreifiedTriple
andannotationBlock
productions.