@@ -185,6 +185,9 @@ def __init__(self, filename, parentParser):
185185 P .Optional (g (kw ("divisor" ) + decimal_literal + s (";" ))) & \
186186 P .Optional (g (kw ("offset" ) + decimal_literal + s (";" ))) & \
187187 P .Optional (g (kw ("description" ) + P .QuotedString ('"' ) + s (";" ))) & \
188+ P .Optional (g (kw ("location" ) + P .QuotedString ('"' ) + s (";" ))) & \
189+ P .Optional (g (kw ("subsystem" ) + P .QuotedString ('"' ) + s (";" ))) & \
190+ P .Optional (g (kw ("group" ) + P .QuotedString ('"' ) + s (";" ))) & \
188191 P .Optional (g (kw ("true_label" ) + P .QuotedString ('"' ) + s (";" ))) & \
189192 P .Optional (g (kw ("false_label" ) + P .QuotedString ('"' ) + s (";" ))) \
190193 ) + s ("}" )
@@ -282,6 +285,9 @@ def xdr_parse_fielddoc(self, x):
282285 offset = 0
283286 true_label = ''
284287 false_label = ''
288+ location = ''
289+ subsystem = ''
290+ group = ''
285291 for field in x :
286292 if field [0 ] == 'key' :
287293 key = field [1 ]
@@ -303,15 +309,23 @@ def xdr_parse_fielddoc(self, x):
303309 inv = self .stringify_conversion (field [1 ])
304310 if field [0 ] == 'computed_by' :
305311 computed = self .stringify_conversion (field [1 ])
312+ if field [0 ] == 'location' :
313+ location = field [1 ]
314+ if field [0 ] == 'subsystem' :
315+ subsystem = field [1 ]
306316 if field [0 ] == 'true_label' :
307317 true_label = field [1 ]
308318 if field [0 ] == 'false_label' :
309319 false_label = field [1 ]
310- return XDRFieldDocumentation (key , name , desc , offset , divisor , conv , inv , unit , computed , true_label , false_label )
320+ if subsystem == '' and group != '' :
321+ subsystem = group
322+ if group == '' and subsystem != '' :
323+ group = subsystem
324+ return XDRFieldDocumentation (key , name , desc , offset , divisor , conv , inv , unit , computed , true_label , false_label , location , subsystem , group )
311325
312326 def xdr_parse_declaration (self , x ):
313327 if x [0 ] == 'void' :
314- return XDRDeclaration (None , 'basic' , 'void' , None , None , True , XDRFieldDocumentation ('' , '' , '' , 0 , 1 , '' , '' , '' , '' , '' , '' ), 0 , 'void' )
328+ return XDRDeclaration (None , 'basic' , 'void' , None , None , True , XDRFieldDocumentation ('' , '' , '' , 0 , 1 , '' , '' , '' , '' , '' , '' , '' , '' , '' ), 0 , 'void' )
315329 elif x [0 ] == 'opaque' or x [0 ] == 'string' :
316330 type = x [0 ]
317331 name = x [1 ]
0 commit comments