Difference between revisions of "Disassembler"

From DocDataFlow
Jump to: navigation, search
Line 1: Line 1:
A disassembler is an [[Atomic Adapter|''atomic adapter'']].
+
A disassembler is an [[Atomic adapter|''atomic adapter'']].
  
 
Disassemblers accept granules via their input. A disassembler will normally pass through all granules it receives. It will also break some of the input granules down into smaller granules, and it will 'inject' these smaller granules into the granule stream. The smaller granules are injected before the input granule from which they originated. Granules that are of no interest to the disassembler are normally passed through unmodified.
 
Disassemblers accept granules via their input. A disassembler will normally pass through all granules it receives. It will also break some of the input granules down into smaller granules, and it will 'inject' these smaller granules into the granule stream. The smaller granules are injected before the input granule from which they originated. Granules that are of no interest to the disassembler are normally passed through unmodified.

Revision as of 02:57, 28 December 2013

A disassembler is an atomic adapter.

Disassemblers accept granules via their input. A disassembler will normally pass through all granules it receives. It will also break some of the input granules down into smaller granules, and it will 'inject' these smaller granules into the granule stream. The smaller granules are injected before the input granule from which they originated. Granules that are of no interest to the disassembler are normally passed through unmodified.

For example, when a disassembler breaks apart a 'paragraph' granule into a series of 'word' granules, the output of the disassembler will typically consist of a stream of word granules, followed by the original paragraph granule from which the word granules were extracted.

An assembler further down the track will often mostly ignore such paragraph granule as far as its contents go. Instead it will collect the word granules, and wait for the paragraph granule solely as a terminating trigger to signify the series of word granules is complete.

An example input with three granules could look like this:

Para: this is a paragraph
Para: this is another paragraph
TextFrame: pos (10, 20), width 20, height 80

A paragraph disassembler might convert this input into the following output:

Word: this
Word: is
Word: a
Word: paragraph
Para: this is a paragraph
Word: this
Word: is
Word: another
Word: paragraph
Para: this is another paragraph
TextFrame: pos (10, 20), width 20, height 80

In other words: in normal circumstances, a disassembler will only add to the data flow. It won't take granules away.