Textual BNF for text-graphic objects

Finally and alternatively, the structure of text-graphic objects can also be represented textually if we take a few liberties with BNF:

<text-graphic object> := <pattern> | <drawline>
<pattern> := ( ) | (<text-graphic object> . <pattern>)
<drawline> := <colored stroke> | <array of colored dots>

Where "(", ")", "." and "|" are not shown. And where parentheses indicate pattern grouping, dot means add on to front of pattern [ie (x . y) adds obj x onto front of pattern y], and vertical bar means or. Stroke lines have varying width over a path.

Each text-graphic object has a spatial location independent from its pattern membership, but usually related in conventional ways. Ordering in patterns may be ignored, in which case patterns function as sets.

And then Roman style text      Romaji or Romanji      can be parsed as 26 little patterns with certain conventions for arranging them spatially (often, left to right and top to bottom) ...

<Romaji-text> := (<Romaji-word> {<Romaji-word>})
<Romaji-word> := (<Romaji-char> {<Romaji-char>})
<Romaji-char> := (<drawline> {<drawline>} )

Where "{    }" means one or more.

  Back to first page