[Material Nodes] Node output to vertex group?

Is there anyway that I can use the output from a material node to define a vertex group, so that I can have a dynamic vertex group?

To give you an example:
If I created a node setup that would allow for Material A to appear where light is hitting a mesh, and then have Material B where there is no light. Yet I wanted to have a particle system emit only from where Material A is, so that when I animate the light and the materials change across the mesh the particle system moves dynamically as well.

Currently the only way I know of to define what part of a mesh a particle system is being emitted from is through a vertex group. So I was hoping that I would be able to use the material node output to define the vertex group, the same way it defies what part of the mesh receives which material, but I can’t seem to figure out a way.

Does anyone know if this is possible? Or a workaround that I could use?