[build][core] rules graph: definitions and multiple tokens