]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/PatternGrammar.txt
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / lib2to3 / PatternGrammar.txt
CommitLineData
4710c53d 1# Copyright 2006 Google, Inc. All Rights Reserved.\r
2# Licensed to PSF under a Contributor Agreement.\r
3\r
4# A grammar to describe tree matching patterns.\r
5# Not shown here:\r
6# - 'TOKEN' stands for any token (leaf node)\r
7# - 'any' stands for any node (leaf or interior)\r
8# With 'any' we can still specify the sub-structure.\r
9\r
10# The start symbol is 'Matcher'.\r
11\r
12Matcher: Alternatives ENDMARKER\r
13\r
14Alternatives: Alternative ('|' Alternative)*\r
15\r
16Alternative: (Unit | NegatedUnit)+\r
17\r
18Unit: [NAME '='] ( STRING [Repeater]\r
19 | NAME [Details] [Repeater]\r
20 | '(' Alternatives ')' [Repeater]\r
21 | '[' Alternatives ']'\r
22 )\r
23\r
24NegatedUnit: 'not' (STRING | NAME [Details] | '(' Alternatives ')')\r
25\r
26Repeater: '*' | '+' | '{' NUMBER [',' NUMBER] '}'\r
27\r
28Details: '<' Alternatives '>'\r