title: Howto parse runlength encoded binary subformat with antlr
body: <p>Given the following input:</p>
  
  <pre><code>AA:4:2:@5@xxAAx:2:a:
  </code></pre>
  
  <p>The part @5@ defines the start of a binary subformat with the length of 5. The sub format can contain any kind of character and is likely to contain tokens from the main format. (ex. AA is a keyword/token inside the main format).</p>
  
  <p>I want to build a lexer that is able to extract one token for the whole binary part. </p>
  
  <p>I already tried several approaches (ex. partials, sematic predicates) but I did not get them working together the right way.</p>