precompute arguments for each production rule