A seventh attempt at supporting file location annotations. The changes as compared to the previous version are as follows: In YYLLOC_DEFAULT (the macro used for generating positions in the parser), initialize the next field of positions to NULL. In srcpos_copy, assert that the next field is NULL if the srcpos is not itself NULL. This is the case, because this function is only called on positions made in the parser (ie by YYLLOC_DEFAULT) or with a NULL argument. Reorganize shorten_to_initial_path and its callsite in srcpos_string_comment to free any string that is allocated. I get no errors with valgrind. Thanks to David Gibson for detecting the above issues. Julia Lawall (2): annotations: add positions annotations: add the annotation functionality dtc-parser.y | 13 +++-- dtc.c | 11 +++- dtc.h | 11 ++-- flattree.c | 4 +- fstree.c | 5 +- livetree.c | 33 ++++++++---- srcpos.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++++-- srcpos.h | 7 +++ treesource.c | 46 ++++++++++++++--- 9 files changed, 238 insertions(+), 33 deletions(-) -- 2.18.0