This grammar is intentionally pragmatic for v0.1: it captures the surface syntax needed by the Core spec. It is suitable as the basis for a hand-written parser or parser-generator input after minor adaptation (token rules, whitespace/comment handling).
1) Lexical tokens (informative)
Implementations MUST support:
- Whitespace: spaces, tabs, newlines (ignored except as separators)
- Line comments:
// ...to end of line - Block comments:
/* ... */
Recommended tokens:
IDENT→[A-Za-z_][A-Za-z0-9_]*QNAME→IDENT ('.' IDENT)*STRING→"..."with escapesINT→ digits with optional_separatorsDECIMAL→ digits.digits with optional_DATE→YYYY-MMorYYYY-MM-DD
2) Grammar
The formal EBNF grammar is maintained as a standalone file for use with grammar tooling (railroad diagram generators, parser generators, etc.):
3) Notes & implementation guidance (informative)
- Line breaks are not significant; blocks and keywords provide structure.
money_litis syntactic sugar; implementations should normalize toMoneywithcurrency.DATEacceptsYYYY-MMandYYYY-MM-DD; normalizeYYYY-MMtoYYYY-MM-01during parsing.schedule_optsare order-independent; parsers should accept any order.activate contract/deactivate contractare included in grammar, but may be a no-op in early engines.