'How can I write semantic tagging in grxml with some prefix number?

I am building a GRXML grammar for a software that will use nuance for voice recognition. The tags must follow the tag-format "swi-semantics/1.0" following are the logic

  1. 7 digits or
  2. 4 digit or 7 Digits a) if 4 digits enter i.e 1234 translate it into with prefix 101 like 1011234 b) 7 digits start with 101 + 4 digit.

I am new with the grammar. I am confuse how can i add the prefix 101.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source