On 1/04/2015 17:57, Kit Park wrote:
> Please find the attached which is C++ boost header and again, the problem is
> that gtags fails to parse it and shows an error mentioned.
gtags didn't recognise the shift operator; attached is the patch to fix it
(only << is tested, as >> may end two templates).
--
Jason.
diff -urp global-6.4/libparser/Cpp.c global-6-4/libparser/Cpp.c
--- global-6.4/libparser/Cpp.c 2015-03-24 12:59:54 +1000
+++ global-6-4/libparser/Cpp.c 2015-04-03 10:36:18 +1000
@@ -208,9 +208,12 @@ Cpp(const struct parser_param *param)
c = nexttoken(NULL,
cpp_reserved_word);
if (c == SYMBOL)
PUT(PARSER_REF_SYM, token, lineno, sp);
- else if (c == '<')
- ++templates;
- else if (c == '>') {
+ if (c == '<') {
+ if (peekc(1) ==
'<')
+
throwaway_nextchar();
+ else
+
++templates;
+ } else if (c == '>') {
if (--templates
== 0)
break;
} else if (c == EOF)
_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global