parser.py (6863:21fbf0412e0d) parser.py (6877:2a1a3d916ca8)
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

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

110 self.symtab.writeCodeFiles(code_path)
111
112 def writeHTMLFiles(self, code_path):
113 util.makeDir(code_path)
114 self.symtab.writeHTMLFiles(code_path)
115
116 def files(self):
117 f = set([
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

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

110 self.symtab.writeCodeFiles(code_path)
111
112 def writeHTMLFiles(self, code_path):
113 util.makeDir(code_path)
114 self.symtab.writeHTMLFiles(code_path)
115
116 def files(self):
117 f = set([
118 'ControllerFactory.cc',
119 'ControllerFactory.hh',
120 'MachineType.cc',
121 'MachineType.hh',
122 'Types.hh' ])
123
124 for decl_list in self.decl_list_vec:
125 f |= decl_list.files()
126
127 return f

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

413 def p_params__none(self, p):
414 "params : empty"
415 p[0] = []
416
417 def p_param(self, p):
418 "param : type ident"
419 p[0] = ast.FormalParamAST(self, p[1], p[2])
420
118 'MachineType.cc',
119 'MachineType.hh',
120 'Types.hh' ])
121
122 for decl_list in self.decl_list_vec:
123 f |= decl_list.files()
124
125 return f

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

411 def p_params__none(self, p):
412 "params : empty"
413 p[0] = []
414
415 def p_param(self, p):
416 "param : type ident"
417 p[0] = ast.FormalParamAST(self, p[1], p[2])
418
419 def p_param__default(self, p):
420 "param : type ident '=' NUMBER"
421 p[0] = ast.FormalParamAST(self, p[1], p[2], p[4])
422
421 # Idents and lists
422 def p_idents__braced(self, p):
423 "idents : '{' identx '}'"
424 p[0] = p[2]
425
426 def p_idents__bare(self, p):
427 "idents : ident"
428 p[0] = [ p[1] ]

--- 239 unchanged lines hidden ---
423 # Idents and lists
424 def p_idents__braced(self, p):
425 "idents : '{' identx '}'"
426 p[0] = p[2]
427
428 def p_idents__bare(self, p):
429 "idents : ident"
430 p[0] = [ p[1] ]

--- 239 unchanged lines hidden ---