Support datum_coment - higepon/mosh GitHub Wiki

First step

Rewrite Reader.y in a way that R7RS describes list and dot list.

〈datum〉 −→ 〈simple datum〉 | 〈compound datum〉
| 〈label〉 = 〈datum〉 | 〈label〉 #
〈simple datum〉 −→ 〈boolean〉 | 〈number〉
| 〈character〉 | 〈string〉 | 〈symbol〉 | 〈bytevector〉
〈symbol〉 −→ 〈identifier〉
〈compound datum〉 −→ 〈list〉 | 〈vector〉 | 〈abbreviation〉
〈list〉 −→ (〈datum〉*) | (〈datum〉+ . 〈datum〉)
〈abbreviation〉 −→ 〈abbrev prefix〉 〈datum〉
〈abbrev prefix〉 −→ ’ | ` | , | ,@
〈vector〉 −→ #(〈datum〉*)
〈label〉 −→ # 〈uinteger 10〉

How do you express * and + in Bison grammer?

Per https://stackoverflow.com/questions/29235967/bison-one-or-more-occurrences-in-grammar-file

One or more:

declarations
    : declaration
    | declarations declaration
    ;

Zero or more:

declarations
    : /* empty */
    | declarations declaration
    ;

How to debug

Debugging (Bison 3.8.1)