diff options
Diffstat (limited to 'tools/idl_parser/idl_parser.py')
-rwxr-xr-x | tools/idl_parser/idl_parser.py | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/tools/idl_parser/idl_parser.py b/tools/idl_parser/idl_parser.py index 8a682ea..10428de 100755 --- a/tools/idl_parser/idl_parser.py +++ b/tools/idl_parser/idl_parser.py @@ -36,22 +36,8 @@ import time from idl_lexer import IDLLexer from idl_node import IDLAttribute, IDLNode -# -# Try to load the ply module, if not, then assume it is in the third_party -# directory. -# -try: - # Disable lint check which fails to find the ply module. - # pylint: disable=F0401 - from ply import lex - from ply import yacc -except ImportError: - module_path, module_name = os.path.split(__file__) - third_party = os.path.join(module_path, os.par, os.par, 'third_party') - sys.path.append(third_party) - # pylint: disable=F0401 - from ply import lex - from ply import yacc +from ply import lex +from ply import yacc # # ERROR_REMAP @@ -876,7 +862,7 @@ class IDLParser(object): def __init__(self, lexer, verbose=False, debug=False, mute_error=False): self.lexer = lexer self.tokens = lexer.KnownTokens() - self.yaccobj = yacc.yacc(module=self, tabmodule=None, debug=debug, + self.yaccobj = yacc.yacc(module=self, tabmodule=None, debug=False, optimize=0, write_tables=0) self.parse_debug = debug self.verbose = verbose @@ -987,8 +973,6 @@ class IDLParser(object): return IDLAttribute(key, Boolean(True)) def GetErrors(self): - # Access lexer errors, despite being private - # pylint: disable=W0212 return self._parse_errors + self.lexer._lex_errors # |