From: Thomas Walker Lynch Date: Wed, 14 May 2025 15:22:27 +0000 (-0700) Subject: EBNF tweak in README for #macro X-Git-Url: https://git.reasoningtechnology.com/usr/lib/python2.7/encodings/palmos.py?a=commitdiff_plain;h=289dad48494f668006268b6cbea6fcecad6d5ab1;p=RT-gcc EBNF tweak in README for #macro --- diff --git a/README.md b/README.md index 3f9ed9a..ad30d42 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ Defines a macro in standard ISO form, using token literal parsing and optional p #### Syntax (EBNF): ``` + directive ::= "#macro" name params body ; name ::= identifier ; @@ -53,15 +54,12 @@ name ::= identifier ; params ::= "(" param_list? ")" ; param_list ::= identifier ("," identifier)* ; -body ::= clause ; - -clause ::= "(" literal? ")" - | "[" expr? "]" ; +body ::= "(" literal? ")" ; literal ::= ; sequence parsed into tokens without expansion -expr ::= ; sequence parsed into tokens with recursive expansion ; whitespace, including newlines, is ignored + ``` - A `literal` clause is delimited with `(` ... `)` and behaves like `#define F(x) (x + 1)`.