You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The people at pyparsing broke backwards compatibility with no valid reasons (one of the things I really don't like...)
I use the patch below for amoco, which allows to work either with old or recent versions of pyparsing.
diff --git a/amoco/arch/msp430/parsers.py b/amoco/arch/msp430/parsers.py
index 9c25189..6c75a7d 100644
--- a/amoco/arch/msp430/parsers.py
+++ b/amoco/arch/msp430/parsers.py
@@ -6,6 +6,9 @@
# published under GPLv2 license
import pyparsing as pp
+if not hasattr(pp, 'operatorPrecedence'):
+ # backward compatibility, needed since version 3.0.x
+ pp.operatorPrecedence = pp.infixNotation
from amoco.logger import Log
diff --git a/amoco/arch/sparc/parsers.py b/amoco/arch/sparc/parsers.py
index 602720a..8902242 100644
--- a/amoco/arch/sparc/parsers.py
+++ b/amoco/arch/sparc/parsers.py
@@ -6,6 +6,9 @@
# published under GPLv2 license
import pyparsing as pp
+if not hasattr(pp, 'operatorPrecedence'):
+ # backward compatibility, needed since version 3.0.x
+ pp.operatorPrecedence = pp.infixNotation
from amoco.logger import Log
diff --git a/amoco/arch/x86/parsers.py b/amoco/arch/x86/parsers.py
index 65651cd..9bbccbe 100644
--- a/amoco/arch/x86/parsers.py
+++ b/amoco/arch/x86/parsers.py
@@ -2,6 +2,9 @@
# -*- coding: utf-8 -*-
import pyparsing as pp
+if not hasattr(pp, 'operatorPrecedence'):
+ # backward compatibility, needed since version 3.0.x
+ pp.operatorPrecedence = pp.infixNotation
from amoco.arch.x86 import spec_ia32, spec_fpu, spec_sse
from amoco.logger import Log
diff --git a/amoco/cas/parser.py b/amoco/cas/parser.py
index 3c8b8f7..87dabac 100644
--- a/amoco/cas/parser.py
+++ b/amoco/cas/parser.py
@@ -15,6 +15,9 @@ from .expressions import bot, top, reg, ext
# -------------------
import pyparsing as pp
+if not hasattr(pp, 'operatorPrecedence'):
+ # backward compatibility, needed since version 3.0.x
+ pp.operatorPrecedence = pp.infixNotation
# terminals:
p_bottop = pp.oneOf("⊥ T")
The text was updated successfully, but these errors were encountered:
The people at pyparsing broke backwards compatibility with no valid reasons (one of the things I really don't like...)
I use the patch below for amoco, which allows to work either with old or recent versions of pyparsing.
The text was updated successfully, but these errors were encountered: