Subtree Specification LL(1) Grammar

Here is the LL(1) grammar used to decode a subtreeSpecification as described by RFC 3672

<SubtreeSpecification> ::= '{' <spse> <base-e> <chopSpecification> <spse> <refinement-e> '}'

<base-e> ::= 
	«base» <sps> <localName> <spse> ',' <spse> | 
	e

<chopSpecification> ::= «chopSpecification» '{' <spse> <chopSpecification-in> '}'

<chopSpecification-in> ::= 
	«specificExclusions» <spse> <chop-set-of-choice> <spse> <specificExclusions-follower> |
	«minimum» <sps> <number> <spse> <minimum-follower> |
	«maximum» <sps> <number> <spse>

<specificExclusions-follower> ::= 
	',' <spse> «minimum» <sps> <number> <spse> <minimum-follower> |
	',' <spse> «maximum» <sps> <number> <spse>

<minimum-follower> ::= ',' <spse> «maximum» <sps> <number> <spse>

<refinement-e> ::= 
        «specificationFilter» <sps> <refinement> | 
        e

<refinement> ::= 
	«item» <spse> ':' <spse> OID <spse> |
	«and» <spse> ':' <spse> <set-of-refinement> |
	«or» <spse> ':' <spse> <set-of-refinement> |
	«not» <spse> ':' <spse> <refinement> |

<set-of-refinement> ::= '{' <spse> <refinement> <refinements> '}' <spse>

<refinements> ::= 
        ',' <spse> <refinement> | 
        e

<localName> ::= '"' DN '"'