Fix code parser

1. Replace manual code parsing from graph utils with CodeGenDS
2. Added testcase for range expression in CBN