parser.py (6882:898047a3672c) parser.py (6907:b05de761960e)
1# Copyright (c) 2009 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 407 unchanged lines hidden (view full) ---

416 def p_param(self, p):
417 "param : type ident"
418 p[0] = ast.FormalParamAST(self, p[1], p[2])
419
420 def p_param__pointer(self, p):
421 "param : type STAR ident"
422 p[0] = ast.FormalParamAST(self, p[1], p[3], None, True)
423
1# Copyright (c) 2009 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 407 unchanged lines hidden (view full) ---

416 def p_param(self, p):
417 "param : type ident"
418 p[0] = ast.FormalParamAST(self, p[1], p[2])
419
420 def p_param__pointer(self, p):
421 "param : type STAR ident"
422 p[0] = ast.FormalParamAST(self, p[1], p[3], None, True)
423
424 def p_param__default(self, p):
424 def p_param__pointer_default(self, p):
425 "param : type STAR ident '=' STRING"
426 p[0] = ast.FormalParamAST(self, p[1], p[3], p[5], True)
427
428 def p_param__default_number(self, p):
425 "param : type ident '=' NUMBER"
426 p[0] = ast.FormalParamAST(self, p[1], p[2], p[4])
427
429 "param : type ident '=' NUMBER"
430 p[0] = ast.FormalParamAST(self, p[1], p[2], p[4])
431
432 def p_param__default_bool(self, p):
433 "param : type ident '=' LIT_BOOL"
434 p[0] = ast.FormalParamAST(self, p[1], p[2], p[4])
435
436 def p_param__default_string(self, p):
437 "param : type ident '=' STRING"
438 p[0] = ast.FormalParamAST(self, p[1], p[2], p[4])
439
428 # Idents and lists
429 def p_idents__braced(self, p):
430 "idents : '{' identx '}'"
431 p[0] = p[2]
432
433 def p_idents__bare(self, p):
434 "idents : ident"
435 p[0] = [ p[1] ]

--- 243 unchanged lines hidden ---
440 # Idents and lists
441 def p_idents__braced(self, p):
442 "idents : '{' identx '}'"
443 p[0] = p[2]
444
445 def p_idents__bare(self, p):
446 "idents : ident"
447 p[0] = [ p[1] ]

--- 243 unchanged lines hidden ---