preproc: Handle curly braces in multi-line macro parameters
commit5eac14bb0e5597d2bee902bee3a8ec981fa5ca03
authorJin Kyu Song <jin.kyu.song@intel.com>
Thu, 28 Nov 2013 04:52:16 +0000 (27 20:52 -0800)
committerJin Kyu Song <jin.kyu.song@intel.com>
Thu, 28 Nov 2013 04:54:07 +0000 (27 20:54 -0800)
treecd11d3a5886434b672ee10b93bff21caf4c94a8c
parent28f95668e070d4cbe81c48f22e0a931e23ab4919
preproc: Handle curly braces in multi-line macro parameters

Multi-line macro uses curly braces for enclosing a parameter
containing comma(s). Passing curly braces as a part of a parameter
which is already enclosed with braces confuses the macro expander.

The number of braces in a group parameter is counted and any brace
in the outmost enclosing braces is treated as a part of parameter.
e.g.) mmacro {1,2,3}, {4,{5,6}}
      mmacro gets 2 parameters of '1,2,3' and '4,{5,6}'

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
preproc.c