From 0e96e69659c7c31927b7eee5c40d017b035a6471 Mon Sep 17 00:00:00 2001 From: Erik Oosting Date: Mon, 11 Dec 2023 15:25:24 +0100 Subject: Initial commit Adding grammar --- gen/ANF.interp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 gen/ANF.interp (limited to 'gen/ANF.interp') diff --git a/gen/ANF.interp b/gen/ANF.interp new file mode 100644 index 0000000..ff21a22 --- /dev/null +++ b/gen/ANF.interp @@ -0,0 +1,42 @@ +token literal names: +null +'+' +'-' +'*' +'/' +'(' +':' +')' +',' +'let' +'=' +'in' +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +null +null +null +null +IDENT +NUMBER +WS + +rule names: +aexp +funcall +cexp + + +atn: +[4, 1, 14, 60, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 16, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 30, 8, 0, 10, 0, 12, 0, 33, 9, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 40, 8, 1, 10, 1, 12, 1, 43, 9, 1, 1, 1, 1, 1, 1, 1, 3, 1, 48, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 58, 8, 2, 1, 2, 0, 1, 0, 3, 0, 2, 4, 0, 0, 65, 0, 15, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 57, 1, 0, 0, 0, 6, 7, 6, 0, -1, 0, 7, 16, 5, 12, 0, 0, 8, 16, 5, 13, 0, 0, 9, 10, 5, 5, 0, 0, 10, 11, 5, 12, 0, 0, 11, 12, 5, 6, 0, 0, 12, 13, 3, 4, 2, 0, 13, 14, 5, 7, 0, 0, 14, 16, 1, 0, 0, 0, 15, 6, 1, 0, 0, 0, 15, 8, 1, 0, 0, 0, 15, 9, 1, 0, 0, 0, 16, 31, 1, 0, 0, 0, 17, 18, 10, 5, 0, 0, 18, 19, 5, 1, 0, 0, 19, 30, 3, 0, 0, 6, 20, 21, 10, 4, 0, 0, 21, 22, 5, 2, 0, 0, 22, 30, 3, 0, 0, 5, 23, 24, 10, 3, 0, 0, 24, 25, 5, 3, 0, 0, 25, 30, 3, 0, 0, 4, 26, 27, 10, 2, 0, 0, 27, 28, 5, 4, 0, 0, 28, 30, 3, 0, 0, 3, 29, 17, 1, 0, 0, 0, 29, 20, 1, 0, 0, 0, 29, 23, 1, 0, 0, 0, 29, 26, 1, 0, 0, 0, 30, 33, 1, 0, 0, 0, 31, 29, 1, 0, 0, 0, 31, 32, 1, 0, 0, 0, 32, 1, 1, 0, 0, 0, 33, 31, 1, 0, 0, 0, 34, 35, 5, 12, 0, 0, 35, 36, 5, 5, 0, 0, 36, 41, 3, 0, 0, 0, 37, 38, 5, 8, 0, 0, 38, 40, 3, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 43, 1, 0, 0, 0, 41, 39, 1, 0, 0, 0, 41, 42, 1, 0, 0, 0, 42, 44, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 44, 45, 5, 7, 0, 0, 45, 48, 1, 0, 0, 0, 46, 48, 3, 0, 0, 0, 47, 34, 1, 0, 0, 0, 47, 46, 1, 0, 0, 0, 48, 3, 1, 0, 0, 0, 49, 50, 5, 9, 0, 0, 50, 51, 5, 12, 0, 0, 51, 52, 5, 10, 0, 0, 52, 53, 3, 2, 1, 0, 53, 54, 5, 11, 0, 0, 54, 55, 3, 4, 2, 0, 55, 58, 1, 0, 0, 0, 56, 58, 3, 2, 1, 0, 57, 49, 1, 0, 0, 0, 57, 56, 1, 0, 0, 0, 58, 5, 1, 0, 0, 0, 6, 15, 29, 31, 41, 47, 57] \ No newline at end of file -- cgit 1.4.1-2-gfad0