6 %token <string> SYMBOL STRING
\r
7 %token LPAREN RPAREN LBRACKET RBRACKET DOT EOF
\r
10 %type <Types.scheme_object> main
\r
13 main : expr { $1 } /* exprlist EOF { List.rev $1 } */
\r
17 : LPAREN exprlist RPAREN { ProperList (List.rev $2) }
\r
18 | LBRACKET exprlist RBRACKET { ProperList (List.rev $2) }
\r
19 | LPAREN exprlist expr DOT expr RPAREN { ImproperList ((List.rev ($3::$2)), $5) }
\r
20 | LBRACKET exprlist expr DOT expr RBRACKET { ImproperList ((List.rev ($3::$2)), $5) }
\r
25 | exprlist expr { $2::$1 }
\r
30 | SYMBOL { Symbol $1 }
\r
31 | STRING { String $1 }
\r