don't claim that single slashes are comments

Change-Id: Iae5c66ebebe580595a16caa765eeee9f5e97f2c4
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
remove pointless additions

yyWord is always empty at this point.

Change-Id: I1bf897c61e25d52978a77a0d6121078ef264b503
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
micro-cleanup: exit directly upon unexpected eof

there is not much point in going on.

Change-Id: Ic278941c4b8bbce4ccd93ab92628ab98c2ab3ae2
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
cancel complex constructs at end of #define

it's possible that we encounter the end of a #define statement while in
the middle of a complex construct (which is part of a macro, obviously).
we should discard those, as otherwise Weird Things may happen.

Change-Id: Ie9608ad0215e105ab5e5bac110e4118029fa6c15
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
make comments not confuse the c++ parser

comments can appear pretty much everywhere. consequently, handling them
as proper tokens is rather tedious (and was of course not done
consistently, leading to numerous bugs).

so take them out of the token stream and handle magic comments "in the
background".

this necessitates that we use match() a bit more sparingly, as we must
not call getToken() after a "tr()-terminating" token too early, as it
might erroneously collect subsequent magic comments too early otherwise.

Task-number: QTBUG-21876
Change-Id: I3d2168f019dfc06b0778142bcd5eb619b61e6b2d
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
avoid false positives when looking for magic comments

expect meta data only at the beginning of statements.

this required syntax fixes in some unrelated autotests.

Task-number: QTBUG-11866
Change-Id: Ic0c0c150ac8648df6953a510b8eb0c199c8d3ae2
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
update all data of existing messages in extend()

when the message identifier (msgid or context/source/disambiguation)
appears in multiple places, the remaining meta data may be inconsistent
between the occurrences. we need to handle partial data on one hand, and
contradicting data on the other.

Task-number: QTBUG-29131
Task-number: QTBUG-32725
Change-Id: I1ed08e42e266b0b5f014400c137abbcec9ffb93d
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
de-duplicate extra comments when adding a message multiple times

Change-Id: I1ed80166be3cb53f865c083b0a693148b6000731
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
reshuffle the code for clarity

less spaghetti, less nesting

Change-Id: Ib60214e23e20c9592f4eba362ea7a55fe92d8805
Reviewed-by: hjk <hjk121@nokiamail.com>
don't ignore changes to meta data when updating translation units

Task-number: QTBUG-18890
Change-Id: Iceb466105d5fae56da0e2d26cb245fa610fed865
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
remove dead files

Change-Id: I3735795bc51ad42ff7ad242221ef1dd174d882f1
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>