From 394d0bdc28d1ecec02ddda2c4980e14ca787aa5d Mon Sep 17 00:00:00 2001 From: Yutaka Ichibangase Date: Sun, 17 Jul 2022 10:13:58 +0900 Subject: [PATCH] fix the priority and specifier of operator colon --- bootstrap.pl | 46 +++++++++------------------------------------- 1 file changed, 9 insertions(+), 37 deletions(-) diff --git a/bootstrap.pl b/bootstrap.pl index ff96055..d9aa0fd 100644 --- a/bootstrap.pl +++ b/bootstrap.pl @@ -3,51 +3,23 @@ */ % operators -:-(op(1200, xfx, :-)). -:-(op(1200, xfx, -->)). -:-(op(1200, fx, :-)). -:-(op(1200, fx, ?-)). +:-(op(1200, xfx, [:-, -->])). +:-(op(1200, fx, [:-, ?-])). :-(op(1105, xfy, '|')). :-(op(1100, xfy, ;)). :-(op(1050, xfy, ->)). :-(op(1000, xfy, ',')). :-(op(900, fy, \+)). -:-(op(700, xfx, =)). -:-(op(700, xfx, \=)). -:-(op(700, xfx, ==)). -:-(op(700, xfx, \==)). -:-(op(700, xfx, @<)). -:-(op(700, xfx, @=<)). -:-(op(700, xfx, @>)). -:-(op(700, xfx, @>=)). -:-(op(700, xfx, is)). -:-(op(700, xfx, =:=)). -:-(op(700, xfx, =\=)). -:-(op(700, xfx, <)). -:-(op(700, xfx, =<)). -:-(op(700, xfx, =\=)). -:-(op(700, xfx, >)). -:-(op(700, xfx, >=)). +:-(op(700, xfx, [=, \=])). +:-(op(700, xfx, [==, \==, @<, @=<, @>, @>=])). :-(op(700, xfx, =..)). -:-(op(500, yfx, +)). -:-(op(500, yfx, -)). -:-(op(500, yfx, /\)). -:-(op(500, yfx, \/)). -:-(op(400, yfx, *)). -:-(op(400, yfx, /)). -:-(op(400, yfx, //)). -:-(op(400, yfx, div)). -:-(op(400, yfx, rem)). -:-(op(400, yfx, mod)). -:-(op(400, yfx, <<)). -:-(op(400, yfx, >>)). +:-(op(700, xfx, [is, =:=, =\=, <, =<, >, >=])). +:-(op(600, xfy, :)). +:-(op(500, yfx, [+, -, /\, \/])). +:-(op(400, yfx, [*, /, //, div, rem, mod, <<, >>])). :-(op(200, xfx, **)). :-(op(200, xfy, ^)). -:-(op(200, fy, \)). -:-(op(200, fy, +)). -:-(op(200, fy, -)). -:-(op(100, xfx, @)). -:-(op(50, xfx, :)). +:-(op(200, fy, [+, -, \])). % true/fail