summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prolog/parser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/prolog/parser.py b/prolog/parser.py
index 8fe96da..1b0459b 100644
--- a/prolog/parser.py
+++ b/prolog/parser.py
@@ -22,6 +22,7 @@ from .util import Token
# PARSER
precedence = (
('nonassoc', 'FROM', 'FROMDCG'),
+ ('right', 'PIPE'),
('right', 'IMPLIES'),
('right', 'NOT'),
('nonassoc', 'EQU', 'NEQU', 'EQ', 'NEQ', 'UNIV', 'IS', 'EQA', 'NEQA', 'LT', 'LE', 'GT', 'GE', 'LTL', 'LEL', 'GTL', 'GEL', 'IN', 'INS', 'THROUGH', 'EQFD', 'NEQFD', 'LTFD', 'LEFD', 'GTFD', 'GEFD'),
@@ -32,7 +33,7 @@ precedence = (
('nonassoc', 'UINTEGER', 'UREAL'),
('nonassoc', 'NAME', 'VARIABLE', 'STRING'),
('nonassoc', 'PERIOD'),
- ('nonassoc', 'LBRACKET', 'RBRACKET', 'LPAREN', 'RPAREN', 'COMMA', 'SEMI', 'PIPE', 'LBRACE', 'RBRACE')
+ ('nonassoc', 'LBRACKET', 'RBRACKET', 'LPAREN', 'RPAREN', 'COMMA', 'SEMI', 'LBRACE', 'RBRACE')
)
def make_token(p, n):
@@ -137,6 +138,7 @@ def p_term_binary(p):
| term GTL term
| term GEL term
+ | term PIPE term
| term THROUGH term
| term IN term
| term INS term