System.Macros should observe the following syntax:
macro            ::= '%' macro_name [ argList ] '%' ;
argList          ::= '{' args '}' ;
args             ::= cheat_args | well_formed_args ;
cheat_args       ::= any string not including the substring '}%' ;
well_formed_args ::= [ default_arg ] ( spaces named_arg )* ;
default_arg      ::= double_quoted_string ;
named_arg        ::= arg_name '=' double_quoted_string ;
macro_name       ::= /[A-Z][A-Z:_0-9]*/ ;
arg_name         ::= /[a-zA-Z0-9_]*/ ;
spaces           ::= /[\n\t ]+/ ;

Meta-syntax:
::=      introduces a production
;        terminates a production
'%'      indicates a literal
|        separates alternatives
[ ... ]  indicates an optional construct
( ... )+ indicates "one or more of"
( ... )* indicates "zero or more of"
/.../    indicates a regular expression
Topic revision: r1 - 10 Nov 2008, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy