-
Notifications
You must be signed in to change notification settings - Fork 38
Change: Vendor in latest ply version #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| import sys | ||
| import types | ||
| import copy | ||
| import os |
Check notice
Code scanning / CodeQL
Unused import Note
| return | ||
|
|
||
| if not tokens: | ||
| self.log.error('tokens is empty') |
Check warning
Code scanning / CodeQL
Unreachable code Warning
| module = inspect.getmodule(f) | ||
| self.modules.add(module) | ||
|
|
||
| tokname = self.toknames[fname] |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
| global lexer | ||
|
|
||
| ldict = None | ||
| stateinfo = {'INITIAL': 'inclusive'} |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
| # Create global versions of the token() and input() functions | ||
| token = lexobj.token | ||
| input = lexobj.input | ||
| lexer = lexobj |
Check notice
Code scanning / CodeQL
Unused global variable Note
| for f in self.pfuncs: | ||
| if f[3]: | ||
| parts.append(f[3]) | ||
| except (TypeError, ValueError): |
Check notice
Code scanning / CodeQL
Empty except Note
| return | ||
|
|
||
| if not tokens: | ||
| self.log.error('tokens is empty') |
Check warning
Code scanning / CodeQL
Unreachable code Warning
| if doc[1] == ':': | ||
| self.log.warning('%s:%d: Possible grammar rule %r defined without p_ prefix', | ||
| v.__code__.co_filename, v.__code__.co_firstlineno, n) | ||
| except IndexError: |
Check notice
Code scanning / CodeQL
Empty except Note
| lr.bind_callables(pinfo.pdict) | ||
| parser = LRParser(lr, pinfo.error_func) | ||
|
|
||
| parse = parser.parse |
Check notice
Code scanning / CodeQL
Unused global variable Note
5ede0e2 to
fe8f527
Compare
|
Given it removes commandline options, this feels like more than just a "Codechange" |
|
FWIW I added the use of caching in #63 and in hindsight it was clearly a mistake. |
|
Is this planned for merging any time soon? I'm unable to auto-build my newGRF using Github workflows without it (or finding another solution) so it would be good to know whether I need to find an alternative |
#362 should already fix your build issue I think |
According to https://github.com/dabeaz/ply/blob/master/CHANGES, the latest version will never be available via
pip, and the preferred way to useplyis to vendor it.Latest ply version removes caching of lexer/parser tables, and as a side effect fixes #332.