]> ocean-lang.org Git - ocean/commit
parsergen: pass 'config' in to 'reduce' function.
authorNeilBrown <neil@brown.name>
Sat, 31 May 2014 05:56:20 +0000 (15:56 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 15 Jun 2014 07:20:30 +0000 (17:20 +1000)
commit4162be28cd4c149b595f9ec19f771523d0fa96e0
tree68a32fba479ef4e8e1b611532a45728ba7d88fce
parent361497137e01d3e401265df323974a9fcee34cce
parsergen: pass 'config' in to 'reduce' function.

As we only support synthesise attributes and no inherited attributes,
we have no way for the reduce functions to access any context (such
as building a table of variables) except via global variables (yuck).

So pass the 'context' pointer through.  The main program can embed
this in a larger structure which contains relevant context, and
the reduce functions can find that using pointer manipulation.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/parsergen.mdc