-
Notifications
You must be signed in to change notification settings - Fork 0
Placeholder Definition
Peter Johnson edited this page Nov 24, 2022
·
22 revisions
⚠️ ⚠️ THIS WIKI IS BEING USED TO JOT DOWN IDEAS AT PRESENT. DON'T ASSUME ANYTHING IS FIXED.⚠️ ⚠️
A treacle place holder has the following form:
{{ source < arg1,arg2,argN > filter1 < arg1,arg2,argN > filterN < arg1,argN }}
or
{{ source: arg1,arg2,argN | filter1: arg1,arg2,argN | filterN: arg1,argN }}
in BNF:
<placeholder> ::= "{{" <source> [ <filter-chain> ] "}}"
<source> ::= <variable> | <command> | <literal-value>
<filter-chain> ::= <filter-pipe> <filter> [ <args-group> ]
[ <filter-chain> ]
<args-group> ::= <args-pipe> <args>
<args> ::= <arg> [ "," <args> ]
<arg> ::= <literal-value> | <placeholder>
<variable> ::= <token>
<command> ::= "@" <token> [ <args-group> ]
<filter> ::= <token>
<token> ::= <letter> [ <token-body> ]
<token-body> ::= (<letter> | <digit> | "_" | "-") [ <token-body> ]
<literal-value> ::= <quoted-string> | <integer> | <float>
<integer> ::= [ <number-sign> ] <digits>
<float> ::= <integer> "." <digits>
<number-sign> ::= "+" | "-"
<digits> ::= <digit> [ <digits> ]
<quoted-string> ::= <single-quoted-string> | <double-quoted-string>
<single-quoted-string> ::= <single-quote> [ <escaped-text> ] <single-quote>
<double-quoted-string> ::= <double-quote> [ <escaped-text> ] <double-quote>
<filter-pipe> ::= ">" | "|"
<args-pipe> ::= "<" | ":"
<escaped-text> ::= (<non-escaping-char> | <escape-sequence>)
[ <escaped-text> ]
<escape-sequence> ::= "\" <escaping-char>
<escaping-char> ::= "\" | <single-quote> | <double-quote>
<non-escaping-char> ::= Any character except an <escaping-char> or a
control character
<digit> ::= Any digit
<single-quote> ::= "'"
<double-quote> ::= """