Add support for commas within parenthesized groups in function arguments.
authorCarl Worth <cworth@cworth.org>
Thu, 20 May 2010 15:42:02 +0000 (08:42 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 20 May 2010 15:46:54 +0000 (08:46 -0700)
commit9f3d2c4e3dff3eb4f5820a034426056bf66b3015
tree0b0b5cc681aa804580caaadf75763ac59eae8b68
parentb569383bbdfa22ed591255f56fb93832633a95ae
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.
glcpp-parse.y
tests/038-func-arg-with-commas.c [new file with mode: 0644]