added trivial setup of variant index in parser
resolve for pattern matching in progress. does not work yet.