diff options
author | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-08 11:35:18 +0000 |
---|---|---|
committer | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-08 11:35:18 +0000 |
commit | 41e296599b5eb81494472cbdb6ec86746f682bcd (patch) | |
tree | a2b6233e6ed633acbfc7814d5a65767d4e951e8c /tools/idl_parser/idl_parser.py | |
parent | 5311147515a6632dab64ba87962f51a790a4b194 (diff) | |
download | chromium_src-41e296599b5eb81494472cbdb6ec86746f682bcd.zip chromium_src-41e296599b5eb81494472cbdb6ec86746f682bcd.tar.gz chromium_src-41e296599b5eb81494472cbdb6ec86746f682bcd.tar.bz2 |
Revert 216379 "IDL parser: fix lint errors and PPAPI ExtAttr gra..."
> IDL parser: fix lint errors and PPAPI ExtAttr grammar (+ test)
>
> This fixes Pylint errors in the IDL parser.
> It also fixes the grammar for PPAPI-specific extended attributes,
> and adds tests.
>
> Beyond beautification, this allows us to use Pylint in future
> (skipping long line checks).
>
> Review URL: https://chromiumcodereview.appspot.com/22411002
TBR=nbarth@chromium.org
Review URL: https://codereview.chromium.org/22681002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216380 0039d316-1c4b-4281-b951-d872f2087c98
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 # |