From 9f3d2c4e3dff3eb4f5820a034426056bf66b3015 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 20 May 2010 08:42:02 -0700 Subject: Add support for commas within parenthesized groups in function arguments. The specification says that commas within a parenthesized group, (that's not a function-like macro invocation), are passed through literally and not considered argument separators in any outer macro invocation. Add support and a test for this case. This support makes a third occurrence of the same "FUNC_MACRO (" shift/reduce conflict appear, so expect that. This change does introduce a fairly large copy/paste block in the grammar which is unfortunate. Perhaps if I were more clever I'd find a way to share the common pieces between argument and argument_or_comma. --- tests/038-func-arg-with-commas.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/038-func-arg-with-commas.c (limited to 'tests/038-func-arg-with-commas.c') diff --git a/tests/038-func-arg-with-commas.c b/tests/038-func-arg-with-commas.c new file mode 100644 index 0000000000..1407c7d6e3 --- /dev/null +++ b/tests/038-func-arg-with-commas.c @@ -0,0 +1,2 @@ +#define foo(x) success +foo(argument (with,embedded , commas) -- tricky) -- cgit v1.2.3