1 (*===----------------------------------------------------------------------===
3 *===----------------------------------------------------------------------===*)
6 (* Install standard binary operators.
7 * 1 is the lowest precedence. *)
8 Hashtbl.add Parser.binop_precedence '<' 10;
9 Hashtbl.add Parser.binop_precedence '+' 20;
10 Hashtbl.add Parser.binop_precedence '-' 20;
11 Hashtbl.add Parser.binop_precedence '*' 40; (* highest. *)
13 (* Prime the first token. *)
14 print_string "ready> "; flush stdout;
15 let stream = Lexer.lex (Stream.of_channel stdin) in
17 (* Run the main "interpreter loop" now. *)
18 Toplevel.main_loop stream;