[build] fix rules parser