Skip to content

Commit 214fc52

Browse files
committedOct 13, 2015
Parenthesis grouping lowered to a different parser level
1 parent 5c60bac commit 214fc52

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎rnc2rng/parser.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ def particle_interleave_multi(s, p):
168168
def particle_interleave_single(s, p):
169169
return Node('INTERLEAVE', None, [p[0], p[2]])
170170

171-
@pg.production('particle : BEG_PAREN pattern END_PAREN')
172-
def pattern_group(s, p):
173-
return Node('GROUP', None, p[1])
174-
175171
@pg.production('particle : annotated-primary MAYBE')
176172
def particle_maybe(s, p):
177173
return Node('MAYBE', None, p[0])
@@ -188,6 +184,10 @@ def particle_some(s, p):
188184
def particle_primary(s, p):
189185
return p[0]
190186

187+
@pg.production('annotated-primary : BEG_PAREN pattern END_PAREN')
188+
def annotated_primary_group(s, p):
189+
return Node('GROUP', None, p[1])
190+
191191
@pg.production('annotated-primary : DOCUMENTATION primary')
192192
def annotated_primary_annotated(s, p):
193193
return Node('DOCUMENTATION', p[0].value, p[1])

0 commit comments

Comments
 (0)