FilterCLIUsingGrammarBasedParser parses CLI style arguments. filters for commands or keys specified in the AllowedList and writes the to the OutLine. OutLine and InLine may be point to the same buffer.