(Better definition, complying with prior exisiting FDS.) |
(→This wiki and FDS: put code into TT tags) |
||
Line 22: | Line 22: | ||
This wiki has a predefined template for code, which visually separates phrases. |
This wiki has a predefined template for code, which visually separates phrases. |
||
− | It has the form <nowiki>{{Code|token type| ... }}</nowiki>. |
+ | It has the form <TT><nowiki>{{Code|token type| ... }}</nowiki></TT>. |
The template also defines the phrase type '''type''' and '''literal''' as different. |
The template also defines the phrase type '''type''' and '''literal''' as different. |
Revision as of 20:22, 14 November 2012
A FDS (short for format-definition string) is the common way to translate operator or statement general formatting schemes.
Definition
The simplest part of a FDS is commonly called a phrase.
Phrases can be selected from a list: this behaviour applies when phrases are separated by slashes and put between square brackets (e.g. [phrase 1/phrase 2/...]
).
Definitions, though, are more flexible, and can be generalized.
- Variables, with the statement
<variable:variable type>
(the type is optional); - Literals, with the statement
<literal>
(the type is optional); - Generic values, which are either variables or literals, with the statement
<value:value type>
(the type is optional); - Whitespace, with the statement
<whitespace>
; - Punctuation, with the statement
<punctuation>
; - Keywords, with the statement
<keyword:statement>
, referring to a statement type; - Operators, with the statement
<operator:statement>
, referring to an operator type.
The statement <solidus>
represents the slash, and is used to avoid confusion with the phrase selector separator.
This wiki and FDS
This wiki has a predefined template for code, which visually separates phrases.
It has the form {{Code|token type| ... }}.
The template also defines the phrase type type and literal as different.