1 (*===----------------------------------------------------------------------===
3 *===----------------------------------------------------------------------===*)
8 (* Install standard binary operators.
9 * 1 is the lowest precedence. *)
10 Hashtbl.add Parser.binop_precedence '<' 10;
11 Hashtbl.add Parser.binop_precedence '+' 20;
12 Hashtbl.add Parser.binop_precedence '-' 20;
13 Hashtbl.add Parser.binop_precedence '*' 40; (* highest. *)
15 (* Prime the first token. *)
16 print_string "ready> "; flush stdout;
17 let stream = Lexer.lex (Stream.of_channel stdin) in
19 (* Run the main "interpreter loop" now. *)
20 Toplevel.main_loop stream;
22 (* Print out all the generated code. *)
23 dump_module Codegen.the_module