Commit c9e748ad authored by POTTIER Francois's avatar POTTIER Francois

Added [dummy_token].

parent 21c7c810
......@@ -3,6 +3,31 @@
module I =
Parser.MenhirInterpreter
(* A dummy token generator. *)
let dummy_token (type a) (symbol : a I.terminal) : Parser.token =
let open I in
let open Parser in
match symbol with
| T_TIMES ->
TIMES
| T_RPAREN ->
RPAREN
| T_PLUS ->
PLUS
| T_MINUS ->
MINUS
| T_LPAREN ->
LPAREN
| T_INT ->
INT 0
| T_EOL ->
EOL
| T_DIV ->
DIV
| T_error ->
assert false
(* A custom symbol printer. *)
let print_symbol symbol =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment