yacc 再帰を理解するのに苦労しています。そこで、与えられた番号のリストを単純にエコーしたい最小限の言語を作成しました。ジソンを使用しています。JISON は次のとおりです。
/* description: Parses end executes mathematical expressions. */
/* lexical grammar */
%lex
%%
\s+ /* skip whitespace */
[0-9]+("."[0-9]+)?\b return 'NUMBER'
<<EOF>> return 'EOF'
. return 'INVALID'
/lex
%start expressions
%% /* language grammar */
expressions
: e EOF
{}
;
e
: NUMBER {}
| NUMBER e
;
空白で区切られた数字のリストをエコーするには、どのようなアクションが必要ですか?