Chapter 22. Input Stream Commands

Table of Contents

Exit
Flush
Ignore
Resume
Set Variable
Unset Variable

These are commands that exist in the input stream. They must be alone and at the beginning of the line to be respected. They will also be passed along to the output stream.

Exit

When encountered, this command will halt input. No further input will be read, no output will be written, and the existing buffers will be silently discarded. After that, the process will exit. If you were considering using Exit, take a look at whether Ignore would suit your needs better. It is strongly recommended to precede an Exit with a Flush.

      <STREAMCMD:EXIT>
    

Flush

When encountered, this command will process all windows in the current buffer before continuing. This means that any window spanning contextual tests would not be able to see beyond a FLUSH point.

      <STREAMCMD:FLUSH>
    

Ignore

When encountered, this command will cause all subsequent input to be passed along to the output stream without any disambiguation, until it finds a Resume command. Useful for excluding parts of the input if it differs in e.g. genre or language. It is strongly recommended to precede an Ignore with a Flush.

      <STREAMCMD:IGNORE>
    

Resume

When encountered, this command resume disambiguation. If disambiguation is already in progress, it has no effect.

      <STREAMCMD:RESUME>
    

Set Variable

Sets global variables. Same effect as the SETVARIABLE rule type, but applicable for a whole parsing chain. Takes a comma-separated list of variables to set, where each variable may have a value.

      <STREAMCMD:SETVAR:poetry,year=1764>
      <STREAMCMD:SETVAR:news>
      <STREAMCMD:SETVAR:greek=ancient>
    

Unset Variable

Unsets global variables. Same effect as the REMVARIABLE rule type, but applicable for a whole parsing chain. Takes a comma-separated list of variables to unset.

      <STREAMCMD:REMVAR:poetry,year>
      <STREAMCMD:REMVAR:news>
      <STREAMCMD:REMVAR:greek>