The dotmemo Format Specification

An open text format. Any tool can read and write it.

dotmemo notes are plain UTF-8 text with the .dotmemo extension: notes, lists, amounts and small calculations, written the way you jot them on paper. The format is public: the specification below is enough to build a reader, a parser or an evaluator of your own.

The dotmemo format specification, grammar dotmemo/1

Summary

A dotmemo file (.dotmemo) is plain UTF-8 text: notes, lists, amounts, currencies, dates, times, contacts, links, and calculations, written the way people write on paper. This document is the exchange contract for that text. It brings together:

Two names recur: .dotmemo is the file extension, dotmemo/1 the version of the grammar that reads it. A file may write that version on its first line, with its settings (#6.6). The same .dotmemo file will one day be readable by a dotmemo/2 grammar; the extension itself will not change.

Contents

  1. Scope
  2. Principles
  3. Conventions
  4. What the reader must preserve
  5. Encoding and characters
  6. Structure
  7. Inline lexicon
  8. Compound forms
  9. Variables
  10. Groups and totals
  11. Calculation blocks
  12. Taxes
  13. Fixed-point entry
  14. Evaluation
  15. Decisions outside the format
  16. Reference lexicon
  17. Reserved symbols and versions
  18. Conformance
  19. Security and privacy
  20. Complete example
  21. Open questions

1. Scope

This document defines the public exchange format dotmemo/1:

It does not define:

2. Principles

  1. Every input is valid. No text produces a syntax error. Whatever is not recognized is text. The user's text is sovereign. A reader or evaluator never modifies the source file to record its results. Computed values are a derived projection (typically shown in the margin), never a rewrite of the text.
  2. Lossless. For any text t: text(tree(t)) == t, byte for byte.
  3. Language neutrality. The grammar uses symbols only. The words (currencies, keywords, multipliers, functions) come from a lexicon (#16). The French and English lexicons are active together, whatever the regional setting.
  4. Nothing is mandatory. Symbols serve to resolve an ambiguity or to force an interpretation; a text with no symbol at all is still valid text. An ambiguity or an unrecognized form must never block the reading of the rest of the document.
  5. Determinism. The same text, the same format version, the same lexicon, and the same settings always give the same tree and the same values, on every machine.

3. Conventions

3.1 Normative vocabulary

Every normative rule in this document is deterministic. The appendix C cases are part of it: where the text and a case disagree, the disagreement is a defect of the document, to be reported (#21); until it is fixed, the case prevails.

3.2 Roles

3.3 Terms

4. What the reader must preserve

The text is the only source of truth. Everything a program shows or computes derives from the text and the settings; nothing computed is written into the text.

4.1 On import

A reader that receives text from an outside source (a file, the clipboard) MUST apply, in this order, these transformations only:

  1. remove an initial UTF-8 BOM (EF BB BF);
  2. convert each CRLF, then each lone CR, into LF.

A text that contains an invalid UTF-8 byte sequence is not a dotmemo/1 text: the import MUST refuse it. A program MAY offer to convert it from another encoding, but that is then a conversion, which the person sees, and not a lossless import.

4.2 After import

The resulting text is the stored text. A reader MUST keep it and rewrite it byte for byte. In particular, it MUST NOT:

A reader that does not recognize a form MUST keep it as it is: it is text. The reserved symbols (#17) are text in dotmemo/1 and MUST be preserved.

4.3 Verifiable property

For any stored text t, a conforming parser produces a tree whose rewrite gives t back: the text of each line is the concatenation of its prefix and the text of its items, and the file is the join of the lines by LF, followed by a LF if the file ends with one (appendix A).

5. Encoding and characters

6. Structure

6.1 Hierarchy

file     = header? + notebook
notebook = section*
section  = separator line? + block*
block    = a non-blank line, followed by consecutive non-blank lines
line     = prefix + content

One or more blank lines separate two blocks; they are kept as they are. A separator line belongs to no block: it also ends the block before it.

Splitting into lines. Empty text has no line. Otherwise, split on each LF keeping the empty pieces; if the text ends with a LF, drop the last piece, which is empty, and note that final LF. So "\n" is one empty line followed by a final LF, and "a" one line with no final LF. Lines are numbered from 1, blank, and separator lines included.

6.2 Day sections

A section begins with a separator line:

=== 2026-10-29 ===
=== 2026-10-29 Thursday ===
=== 2026-10-29 jeudi ===

Form: optional whitespace, at least three =, at least one whitespace, a valid date YYYY-MM-DD (#8.6), optionally a whitespace followed by free text that is ignored, at least one whitespace, at least three =, optional whitespace.

6.3 Indentation

Indentation is optional.

6.4 Titles and groups

Flat groups:

First proposal:
quoted price 2400
fees 600

Second proposal:
quoted price 2700
fees 500
-10% discount

Each text gives two neighbouring groups: the first has 2 items, the second 3.

Indented group:

Second proposal:
    quoted price 2700
    fees 500
    -10% discount
    meeting:
        at 5 PM
        Conference room R2
        confirmed by email
    priority B
    [ ] write the report before Tuesday

meeting is an indented group that stops before priority B; priority B is an item of Second proposal, not of meeting.

6.5 Line prefixes

After the indentation, in this order, each optional:

  1. Bullet: -, *, • (U+2022), or – (U+2013), followed by at least one whitespace. Numbered bullet: 1 to 3 digits followed by . or ), then at least one whitespace. The number is never an amount. + is never a bullet: it marks money in (#8.3). In a calculation block, a line that begins with - or *, followed by a whitespace then a value, follows the rule of #11.3: bullet or operation.
  2. Task box: [ ] (to do, with a U+0020 space), [x] or [X] (done), followed by a whitespace or the end of line.

The prefix of a line is its indentation, its bullet, and its box, with the whitespace that follows them. The content is the rest of the line.

6.6 File header

A file may begin with a header that gives its grammar version and the settings it reads with. A file (with a header) thus gives the same trees and the same totals to every reader.

!dotmemo/1
!region en-US
!currency USD
!tax sales_tax 8.875 % 2024-01-01
!fixed-point no
!dotmemo/1
!région fr-SN
!devise XOF
!taxe tva 18 % 2024-01-01
!virgule-fixe non

7. Inline lexicon

The content of a line is split left to right into simple items. At each position, the classes below are tried in order; the longest match of the first class that succeeds is kept. Every position is covered by at least one class.

Order Class Form
1 escape \ followed by an ASCII punctuation character: that character becomes text; a \ followed by anything else is a literal \
2 url #8.13
3 email #8.14
4 mention #8.11
5 tag #8.12
6 digits a run of digits 0 to 9
7 currency symbol the lexicon's symbols (#16.6)
8 operator a character among + - − * × / ^ ² ³ ( ) % = ;
9 word a letter, then letters, marks, digits, or _; right after digits, letters and marks only
10 punctuation any other non-blank character, one per item
11 whitespace a run of whitespace

The lexicon decides no meaning. The compound forms (#8) are then recognized over the sequence of items, left to right. At each position, these are tried in order: date (#8.6), time (#8.5), phone (#8.7), expression (#8.8), amount (#8.3), percentage (#8.4), number (#8.1), variable reference (a word that names a visible variable, #9). The first form that succeeds is kept, with its longest match. Whatever belongs to no form is text.

In a calculation context (#8.8), dates, times, and phones are not tried.

8. Compound forms

8.1 Numbers

8.2 Multipliers

8.3 Sign and explicit amount

8.4 Percentage

A number followed by %, attached or separated by a single whitespace: 19%, 19 % (with a narrow no-break space in French typography).

8.5 Time

A time is valid if the hours run from 0 to 23 and the minutes from 0 to 59 (from 1 to 12 with am/pm). An invalid form is not a time.

Exact forms, with B a single optional whitespace:

Form Examples
H : MM [B am/pm] 15:30, 3:30pm, 3:30 PM
H B am/pm 3pm, 3 pm
H h [MM] 9h, 15h30, 15H30
H whitespace h [whitespace MM] 15 h, 15 h 30

8.6 Numeric date

Forms: YYYY-MM-DD, DD/MM, DD/MM/YY, DD/MM/YYYY, DD-MM-YYYY, DD.MM.YYYY.

8.7 Phone

  1. Phone: +, with no operand before it, attached to groups of digits each separated by a single whitespace, dot, or hyphen, totalling 8 to 15 digits (E.164 form): +1 555 123 4567, +33612345678, +221 77 123 45 67. If there are several groups, the first has 1 to 3 digits, those of a country code: +5000 3000 is an amount followed by a number.

  2. Phone candidate: at least two groups of 2 to 4 digits, all separated by the same separator, a single whitespace, dot, or hyphen (the four whitespaces count as one), totalling 8 to 15 digits, when the whole sequence is not a valid number (#8.1): 77 123 45 67, 77.123.45.67. 771 234 567 is a number. A group of 4 digits is admitted only if:

    • the first group begins with 0, like a national prefix: 0612 345 678, 06 1234 5678;
    • or the sequence, written with . or -, has the form 3-3-4 (555-123-4567), 4-2-2, or 2-2-4 (2026-13-45, a date that does not exist and does not become a subtraction).

    Otherwise these groups are numbers, side by side or in an expression: 1500 2000, 2500 12 25, 5000-2500, 1500-500-200.

  3. Phone-candidate number: 8 to 15 contiguous digits form a number marked a phone candidate (#8.1): 0612345678, but also 15000000.

Forms 2 and 3 are candidates: interpretation decides (#15). A reader without interpretation treats form 3 as a number and form 2 by the ordinary rules of numbers and operators.

A sequence of groups (forms 1 and 2) starts no other form. The longest sequence that respects all the rules is kept, and none if no prefix respects them:

These rules guarantee that no phone candidate swallows an amount, a date, or a time: an amount never disappears silently into a number.

8.8 Expression

A sequence of operands joined by operators. Operands: number, amount, percentage, variable, tax name (#12), function call, parenthesized expression.

Precedence Forms
1, highest simple operands, signed numbers and amounts, parentheses, calls; negation of a parenthesis, a call, or a variable
2 suffixes ², ³, and %, applied left to right in written order
3 power ^, right-associative
4 multiplication (*, ×, x, X, or implicit) and division /
5, lowest addition and subtraction (+, -, −)

8.9 Variable definition

A whole line (after the prefixes) of the form:

[soit | let] identifier = expression
identifier += expression
identifier -= expression

let and soit come from the lexicon (#16.4) and are both always recognized. == is not a definition. m += 500 equals m = m + 500 and m -= 200 equals m = m - 200; the variable must already be visible, otherwise the line is a definition in error (unknown_variable).

8.10 Identifier

A Unicode letter, then letters, marks, digits, or _; 1 to 32 characters after NFC. Comparison after NFC and case folding: Price and price are the same identifier. An identifier is therefore always a whole word (#7).

8.11 Mention

@, preceded by the start of a line, a whitespace, or (, followed by a letter then letters, marks, digits, or _; - and . are admitted inside, followed by a letter or a digit. _ reads as a space: @Sam_Sea denotes "Sam Sea". A @ preceded by a word character belongs to an email or to text.

8.12 Tag

#, preceded by the start of a line, a whitespace, or (, followed by a letter then letters, marks, digits, or _; - is admitted inside, followed by a letter or a digit. #12 is not a tag.

8.13 URL

8.14 Email

A simplified form of RFC 5322:

9. Variables

  1. Definition: #8.9. A definition line is never an amount.
  2. Scope: from the line that follows the definition to the end of the notebook, in text order (sections, then blocks, then lines). A definition that is an item of a group (#6.4) holds only to the last item of that group; after it, the outer definition, if any, becomes visible again. Exception: the variable of a result line (= total, #11.4) holds to the end of the notebook, even inside a group.
  3. Redefinition: a new definition of the same identifier holds only for the lines that follow it.
  4. Dependencies: an expression may cite only variables visible at its position. Loops are therefore impossible.
  5. Name conflict: an identifier that is also a unit, a multiplier, a currency, a number word, or a tax name is accepted. Within its scope, the defined identifier wins over the other meaning. An interactive program SHOULD warn at the definition.
  6. Evaluation: exact rational arithmetic for + − × ÷ and integer powers; decimal with 34 significant digits for roots and fractional powers (#14). A variable carries a currency if its value carries one.
  7. Rounding: a single one, when the value becomes a counted amount (#14.12).
  8. Errors: full list at #14.11. The line in error is not counted. An error propagates to everything that depends on it. No value is invented.

10. Groups and totals

These rules apply to the amounts kept by interpretation (#15).

  1. The tags of a title apply to all its items.
  2. If items have amounts, the group's total is their sum.
  3. If the title itself carries an amount, it is a check total:
    • if items have amounts, they are the ones counted, the title is not, and a gap between the two SHOULD be reported;
    • if no item has an amount, the title's amount is counted.

11. Calculation blocks

11.1 Line types

11.2 Detection

A block is a calculation block if and only if it contains:

Otherwise, the block follows the usual rules (#6 and #10).

11.3 Bullet or subtraction

In a calculation block, a line that begins with - or *, followed by a whitespace then a value, is:

The first value line of the block is the first line whose content, after an optional bullet (-, *, •, –, or numbered), begins with a value (#11.1). The rule also serves detection (#11.2): a line * 2 read as a bullet does not make the block a calculation one.

Block Reading Result
1500 / - 300 / = subtraction 1200
costs: / - 1500 / - 500 / = total bullets 2000
* 1500 / * 2000 bullets, not a calculation block —
1500 / * 2 / = multiplication 3000

-300 (no whitespace) is always a subtraction. + is never a bullet.

11.4 Calculation

  1. The running total starts at zero.
  2. The first value or item line adds its value to the total, which is zero. A first operation line applies to zero: -300 gives −300.
  3. An operation line applies its operator to the running total; a value or item line with no operator adds to it.
  4. An item line contributes the sum of its kept amounts. The block's result takes the weakest zone of its item lines (#15.2).
  5. A result line shows the running total (a subtotal); the calculation then continues from that value.
  6. If the label of a result line is a single identifier (= total), the result is stored in that variable, visible from the next line to the end of the notebook (#9, rule 2). Any other label (= sub-total, = June total, = total juin) is text.
  7. Comments take no part in the calculation.
  8. Different currencies in one block raise the error mixed_currencies.

The exact detail of the calculation is at #14.9.

11.5 Counting

A calculation block counts as a single amount: the value of its last result line, or the running total at the end of the block if it has none. Its lines and its subtotals are never counted separately.

11.6 Example

1500
+ 2500
- 300
= subtotal
* 2
+ vat
= total

With a tax vat at 19%: subtotal 3700; 3700 × 2 = 7400; 7400 × 1.19 = 8806; total 8806, stored in the variable total. The block counts as a single amount of 8806. The same block with = sub-total and + tva gives the same result for a tax tva at 19%.

12. Taxes

  1. Taxes are settings of the notebook: a name, and a series of rates, each with its effective date (#14.1).

  2. Common names: vat, tva (French), tax. Other names may be defined (tva_b, sales_tax). A tax name follows the rules of an identifier (#8.10).

  3. The rate applied is the one in force at the effective date of the line (#15.1).

  4. In an expression, with t the rate as a fraction (19 % gives 0.19):

    Form Value
    a + T a × (1 + t)
    a - T a ÷ (1 + t) (the tax taken out of the inclusive amount)
    a * T, a × T, a x T a × t (the tax amount)
    T alone t
  5. The line tax is the tax amount of the forms a + T (a × t) and a - T (a − a ÷ (1 + t)), summed over the line (#14.4).

  6. A variable defined with a tax's name masks it within its scope (#9, rule 5).

13. Fixed-point entry

A notebook setting, off by default. It lets you enter cents without typing the decimal separator.

  1. It applies to numbers written with no decimal separator and no multiplier, which are:
    • values added or subtracted in a calculation block (value lines, item lines, + and - operations);
    • or numbers kept as amounts by interpretation.
  2. These numbers are divided by 10^d, where d is the number of decimals of the currency (#16.9): 1250 gives 12.50 for d = 2.
  3. It does not apply to the values of a multiplication, a division, or a power, to percentages, quantities, times, dates, and years, nor when d = 0.

Exact rule: #14.10.

14. Evaluation

Evaluation computes, from the tree (appendix A), the values the tree does not contain: variables, expressions, taxes, calculation-block totals, and the counted amount of each calculation block. It decides nothing probabilistic: the outside decisions are given to it (#15).

14.1 Inputs

  1. The tree of the whole notebook, with the variable references resolved.

  2. The settings:

    Setting Content
    regional setting BCP 47 language-country label (en-US, en-GB, en-IN, fr-FR, fr-SN); see #16.1
    block formats a block's own regional setting, by the number of its first line
    currency ISO 4217 code of the notebook's currency
    taxes for each tax name: a list of rates, each with its effective date
    fixed point on or off (#13)
    import day the day given to lines placed before the first separator line (#6.2, #15.1)

    A file's header replaces the settings it gives (#6.6).

    A rate is written in percent (18 for 18%). The rate of a tax at a date is the one whose effective date is the most recent without exceeding that date.

  3. The outside decisions, line by line (#15): effective date, amounts kept on item lines.

14.2 Values

14.3 Expressions

Operands:

Item Value
number its value
amount its value, with its currency if it is written
percentage its value ÷ 100 (for a + b% and a - b%, see #14.4)
variable the value of its visible definition; none: error unknown_variable
tax the tax's rate at the effective date of the line, as a fraction; no rate: error no_tax_rate
parentheses the value of the inner expression
call #14.6

Operations:

Operation Value
+, - addition, subtraction; special cases at #14.4
* multiplication, implicit included (2m)
/ division; zero divisor: division_by_zero
^ power (#14.5)
², ³ power 2, power 3
% value ÷ 100
negation opposite

A chain of operations of the same level is computed as follows, and the first error met is the expression's:

A chain is computed in one loop: the evaluation stack depends only on the nesting of parentheses and calls, bounded at 32 levels (#8.8).

14.4 Percentages and taxes after + and -

When the right operand of a + or a - is directly a percentage (a percentage item, or a chain whose last operation is %) or a tax, with a the value of the chain before that operation:

Form Value Line tax
a + b% a × (1 + b/100) —
a - b% a × (1 − b/100) —
a + T a × (1 + t) a × t
a - T a ÷ (1 + t); if 1 + t is zero: division_by_zero a − a ÷ (1 + t)

Elsewhere, a percentage is b/100 and a tax is t: 100 + 2 * 5% is 100.1; 100 * vat is 100 × t. The line tax is the sum of the tax amounts of the a + T and a - T forms of the line; it is given only if the line is not in error.

14.5 Powers

With x the base and y the exponent:

14.6 Functions

Each function has a canonical English name and one or more spellings (#16.4).

Function Arguments Value
round 1 or 2 rounded to n decimals (0 by default), half away from zero; n must be an integer with no currency, from −1000 to 1000
floor 1 the greatest integer less than or equal
ceil 1 the smallest integer greater than or equal
abs 1 absolute value
min, max 2 or more the smallest, the greatest argument
sqrt 1 square root (#14.7); negative argument: domain

14.7 Square root

Correctly rounded to 34 significant digits, to nearest, ties to even. An exact root of 34 digits or fewer is therefore exact: sqrt(2.25) is 1.5.

14.8 Definitions

A definition in error keeps its error: each line that cites the variable has the same error, with the same originating line.

14.9 Calculation blocks

The running total starts at 0, with no currency. The lines of the block are read in order:

Line Effect on the running total
value adds the value of its expression (#14.10)
operation +, - total + v or total - v, with the rules of #14.4 (#14.10 for v)
operation *, /, ^ total × v, total ÷ v, total ^ v; a percentage is b/100, a tax t
result none; stores the total in the variable if the label is an identifier
item adds the sum of its kept amounts (#14.10, #15)
definition none; the variable is evaluated (#14.8)
other none (comment)

14.10 A value written alone: fixed point and ambiguous separator

A value written alone is, in a calculation block, the expression of a value line or of a + or - operation, or an amount kept on an item line, when it is a number or an amount (and not a compound expression). Its reference currency is its own if it is written, otherwise the notebook's; d is the number of decimals of that currency (#16.9).

  1. Ambiguous separator: if the number is marked ambiguous (#8.1), its separator was read as a decimal separator, and d = 0, the value is multiplied by 1000: in fr, in XOF, or in JPY, 1,500 is 1500.
  2. Fixed point: if the setting is on, d > 0, and the number is written with no decimal part and no multiplier, the value is divided by 10^d: in EUR, 1250 is 12.5.

Elsewhere, a number keeps the value of the tree: + 2x1250 adds 2500, * 3 multiplies by 3.

14.11 Errors

Code Cause
division_by_zero division by zero, 0 to a negative power, a - T with 1 + t = 0
mixed_currencies two different currencies in one operation (#14.2)
unknown_variable variable with no visible definition, += or -= with no previous definition
arguments wrong number of arguments, or an invalid n for round
domain square root of a negative, non-integer power of a negative
out_of_range value out of range (#14.2), counted amount out of range (#14.12)
no_tax_rate tax with no rate in force at the effective date of the line
currency counted amount in a currency with no minor unit (metals, units of account)

An error carries its code and the number of the line where it was born. It propagates unchanged: x = 1/0 on line 3, then y = x + 1, gives y the division_by_zero error of line 3. A line in error is not counted, and no value is invented in its place.

14.12 Counted amount

15. Decisions outside the format

Some deterministic rules rest on decisions that the text alone does not fix. This document treats them as inputs. It does not say how to make them.

15.1 Effective date

The effective date of a line is, in order: the date written in the line, if an interpretation keeps one; otherwise the day of its section (#6.2); otherwise the block's creation date, known to the application; otherwise the header's day (#6.6) or, failing that, the import day. It serves the tax rates (#12, #14.1).

15.2 Kept amounts and zones

On an item line, an interpretation MAY keep amounts: top-level items of the line (number, amount, or expression), each with a zone: sure or probable, sure being the stronger. Groups (#10), item lines (#11), and fixed point (#13) depend on them.

15.3 What interpretation decides

Outside the format: which numbers are amounts and their nature; dates and times in words; date and phone candidates; persons not marked with @; tasks not marked with a box; categories; the use of a lone variable in a sentence.

15.4 Reader without interpretation

An implementation without interpretation MUST behave as if no decision were made:

Calculation blocks, variables, expressions, and taxes stay fully computable.

16. Reference lexicon

The lexicon gives the words the grammar recognizes. The reference lexicon below is the one of the conformance cases (appendix C). A conforming parser MUST recognize at least these entries. It MAY recognize others; it is then level-2 conforming (#18) only if it can be restricted to the reference lexicon for the checks.

An implementation that adds words changes the trees of some texts: the lexicon is part of the inputs of determinism (#2.5). Two programs that exchange computed values SHOULD use the same lexicon.

16.1 Regions and separators

The language of the regional setting (en, fr) fixes the separators of numbers.

Language Thousands Decimal
en , or a whitespace .
fr a whitespace or . ,

"A whitespace" denotes one of the four whitespaces of #5.

16.2 Date order

The day/month order of numeric dates is day-month-year (DMY), except in en-US, which is month-day-year (MDY).

16.3 CFA franc

F, FCFA, and CFA denote XAF if the regional setting's country is one of: CM (Cameroon), CF (Central African Republic), CG (Congo), GA (Gabon), GQ (Equatorial Guinea), TD (Chad). In every other region, they denote XOF.

16.4 Keywords and functions

16.5 Multipliers

Word Value
k, K, thousand, mille 10³
M, millions, million 10⁶
Md, bn, billion, billions, milliard, milliards 10⁹

k, K, and M compare case-included; the others after case folding.

16.6 Currency symbols

Symbol Currency
€ EUR
$ USD
£ GBP
₦ NGN
₵ GHS
¥ JPY
₹ INR
₣ CFA franc (#16.3)

16.7 Currency names and codes

16.8 Public suffixes

A subset of the Public Suffix List used by URLs and emails: com, org, net, io, be, fr, sn, co.uk. An implementation MAY use the full list; the list's version is then part of its lexicon.

16.9 Minor units (ISO 4217)

The number of minor units (decimals) for each currency, per the ISO 4217 list published on 2026-09-17:

0 decimal:

BIF CLP DJF GNF ISK JPY KMF KRW PYG RWF UGX UYI VND VUV XAF XOF XPF

2 decimals:

AED AFN ALL AMD AOA ARS AUD AWG AZN BAM BBD BDT BMD BND BOB BOV BRL BSD BTN BWP
BYN BZD CAD CDF CHE CHF CHW CNY COP COU CRC CUP CVE CZK DKK DOP DZD EGP ERN ETB
EUR FJD FKP GBP GEL GHS GIP GMD GTQ GYD HKD HNL HTG HUF IDR ILS INR IRR JMD KES
KGS KHR KPW KYD KZT LAK LBP LKR LRD LSL MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR
MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD PAB PEN PGK PHP PKR PLN QAR RON RSD
RUB SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STN SVC SYP SZL THB TJS TMT TOP
TRY TTD TWD TZS UAH USD USN UYU UZS VED VES WST XAD XCD XCG YER ZAR ZMW ZWG

3 decimals:

BHD IQD JOD KWD LYD OMR TND

4 decimals:

CLF UYW

No minor unit (error currency at counting): the metals and units of account, XAG XAU XBA XBB XBC XBD XDR XPD XPT XSU XTS XUA XXX, and any code not listed above.

17. Reserved symbols and versions

In dotmemo/1, the following forms are text, but a future version of the format may give them a meaning:

A dotmemo/1 reader MUST keep them as text (#4.2). An author SHOULD escape them (\>, \{) when they want them to stay text in every version.

The version is read in the header (#6.6). A file with no header is read as dotmemo/1. A new version of the format does not change the stored text: it changes how it is read. Moving from one version to another SHOULD show the person the lines whose reading changes.

18. Conformance

18.1 Levels

Level Name Requirements
1 preserving reader #4 and #5: import, byte-for-byte preservation, reserved symbols
2 parser level 1, and the tree of each syntax case of appendix C, in the format of appendix A
3 evaluator level 2, and the results of each evaluation case of appendix C, in the format of appendix B

An implementation declares its level and the format version: "conforming dotmemo/1, level 2".

18.2 Verification

18.3 Required properties

Beyond the cases, a conforming parser MUST have these properties, for any text:

It SHOULD be tested by fuzzing and on large volumes of real short texts.

19. Security and privacy

20. Complete example

21. Open questions

This draft leaves the following questions open. Feedback is welcome.

  1. Media type. No media type is registered. A type text/x-dotmemo with a charset=utf-8 parameter is the provisional usage.
  2. Lexicon beyond the reference. Should versioned lexicons wider than the reference lexicon be published, so that two implementations can announce the same one?

Appendix A. Syntax tree in JSON

Appendix B. Evaluation results in JSON

Appendix C. Conformance cases