SConscript (6714:028047200ff7) | SConscript (6877:2a1a3d916ca8) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2009 The Hewlett-Packard Development Company 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 56 unchanged lines hidden (view full) --- 65def slicc_emitter(target, source, env): 66 files = [s.srcnode().abspath for s in source[1:]] 67 slicc = SLICC(debug=True) 68 print "SLICC parsing..." 69 for name in slicc.load(files, verbose=True): 70 print " %s" % name 71 72 target.extend(sorted(slicc.files())) | 1# -*- mode:python -*- 2 3# Copyright (c) 2009 The Hewlett-Packard Development Company 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 56 unchanged lines hidden (view full) --- 65def slicc_emitter(target, source, env): 66 files = [s.srcnode().abspath for s in source[1:]] 67 slicc = SLICC(debug=True) 68 print "SLICC parsing..." 69 for name in slicc.load(files, verbose=True): 70 print " %s" % name 71 72 target.extend(sorted(slicc.files())) |
73 pdir = str(protocol_dir) 74 hdir = str(html_dir) 75 76 if not isdir(pdir): 77 os.mkdir(pdir) 78 if not isdir(hdir): 79 os.mkdir(hdir) 80 81 print "SLICC Generator pass 1..." 82 slicc.findMachines() 83 84 print "SLICC Generator pass 2..." 85 slicc.generate() 86 87 print "SLICC writing C++ files..." 88 slicc.writeCodeFiles(pdir) 89 90 print "SLICC writing HTML files..." 91 slicc.writeHTMLFiles(hdir) |
|
73 return target, source 74 75def slicc_action(target, source, env): 76 protocol = source[0].get_contents() 77 pdir = str(protocol_dir) 78 hdir = str(html_dir) 79 80 if not isdir(pdir): --- 22 unchanged lines hidden (view full) --- 103protocol = env['PROTOCOL'] 104sources = [ protocol_dir.File("RubySlicc_interfaces.slicc"), 105 protocol_dir.File("%s.slicc" % protocol) ] 106 107env.Append(BUILDERS={'SLICC' : slicc_builder}) 108nodes = env.SLICC([], [ Value(protocol) ] + sources) 109env.Depends(nodes, slicc_depends) 110 | 92 return target, source 93 94def slicc_action(target, source, env): 95 protocol = source[0].get_contents() 96 pdir = str(protocol_dir) 97 hdir = str(html_dir) 98 99 if not isdir(pdir): --- 22 unchanged lines hidden (view full) --- 122protocol = env['PROTOCOL'] 123sources = [ protocol_dir.File("RubySlicc_interfaces.slicc"), 124 protocol_dir.File("%s.slicc" % protocol) ] 125 126env.Append(BUILDERS={'SLICC' : slicc_builder}) 127nodes = env.SLICC([], [ Value(protocol) ] + sources) 128env.Depends(nodes, slicc_depends) 129 |
111for f in sorted(s for s in nodes if str(s).endswith('.cc')): 112 Source(f) | 130for f in nodes: 131 s = str(f) 132 if s.endswith('.cc'): 133 Source(f) 134 elif s.endswith('.py'): 135 SimObject(f) 136 |