From 1746609e248151d575f6e3913ad5023fd421bfff Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Mon, 28 Mar 2022 01:30:49 +0900 Subject: Simplify the syntax of #ast directive This change allows using the simple syntax of the directive like `#ast $1 $3...` instead of `#ast #(foo $1 $3...)`. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a9f6d30..34e3082 100644 --- a/README.md +++ b/README.md @@ -38,14 +38,14 @@ expr | func_call | integer | id - | '(' expr ')' #ast #(expr $2) + | '(' expr ')' #ast $2 ; func_call - : id '(' args ')' #ast #(func_call $1 $3) - | id '(' ')' #ast #(func_call $1) + : id '(' args ')' #ast $1 $3 + | id '(' ')' #ast $1 ; args - : args ',' expr #ast #(args $1... $3) + : args ',' expr #ast $1... $3 | expr ; -- cgit v1.2.3