# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # A grammar to describe tree matching patterns. # Not shown here: # - 'TOKEN' stands for any token (leaf node) # - 'any' stands for any node (leaf or interior) # With 'any' we can still specify the sub-structure. # The start symbol is 'Matcher'. Matcher: Alternatives ENDMARKER Alternatives: Alternative ('|' Alternative)* Alternative: (Unit | NegatedUnit)+ Unit: [NAME '='] ( STRING [Repeater] | NAME [Details] [Repeater] | '(' Alternatives ')' [Repeater] | '[' Alternatives ']' ) NegatedUnit: 'not' (STRING | NAME [Details] | '(' Alternatives ')') Repeater: '*' | '+' | '{' NUMBER [',' NUMBER] '}' Details: '<' Alternatives '>'
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
fixes | Folder | 0755 |
|
|
pgen2 | Folder | 0755 |
|
|
Grammar.txt | File | 8.47 KB | 0644 |
|
Grammar3.8.12.final.0.pickle | File | 14.95 KB | 0644 |
|
PatternGrammar.txt | File | 793 B | 0644 |
|
PatternGrammar3.8.12.final.0.pickle | File | 1.2 KB | 0644 |
|
__init__.py | File | 7 B | 0644 |
|
__main__.py | File | 67 B | 0644 |
|
btm_matcher.py | File | 6.47 KB | 0644 |
|
btm_utils.py | File | 9.73 KB | 0644 |
|
fixer_base.py | File | 6.53 KB | 0644 |
|
fixer_util.py | File | 14.85 KB | 0644 |
|
main.py | File | 11.38 KB | 0644 |
|
patcomp.py | File | 6.89 KB | 0644 |
|
pygram.py | File | 1.27 KB | 0644 |
|
pytree.py | File | 27.3 KB | 0644 |
|
refactor.py | File | 26.76 KB | 0644 |
|