Skip to content

Jump Instructions

Benedict Albrecht edited this page May 20, 2026 · 5 revisions

Jump Instructions

The jump instruction skips all tokens until a concrete target token is found. Useful when the content between delimiters is irrelevant to the grammar.


Syntax

-->> stopToken

Rule: The target must be a concrete literal — e.g., \n, ), ;, BEGIN, */. It cannot be an or-statement with an empty branch.


Examples

Pattern Matches
// -->> \n Single-line comment: from // to end of line
/* -->> */ Block comment: from /* to */
( -->> ) Parenthesized content: skip to closing )
' -->> ' String literal: from ' to '

Single-line comment

<*comment_line*> // -->> \n <*>

Multi-line comment

<*comment_block*> /* -->> */ <*>

Next: Variables — Capturing tokens and controlling scope.

Clone this wiki locally