SConscript (6877:2a1a3d916ca8) | SConscript (6878:c3a3c09af8be) |
---|---|
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 --- 43 unchanged lines hidden (view full) --- 52 slicc_depends.append(File(joinpath(root, f))) 53 54# 55# Use SLICC 56# 57 58def slicc_scanner(node, env, path): 59 contents = node.get_contents() | 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 --- 43 unchanged lines hidden (view full) --- 52 slicc_depends.append(File(joinpath(root, f))) 53 54# 55# Use SLICC 56# 57 58def slicc_scanner(node, env, path): 59 contents = node.get_contents() |
60 files = [ line.strip() for line in contents.splitlines() ] | 60 files = [ line.strip() for line in contents.splitlines() if line ] |
61 return files 62 63env.Append(SCANNERS=Scanner(function=slicc_scanner,skeys=['.slicc'])) 64 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..." --- 68 unchanged lines hidden --- | 61 return files 62 63env.Append(SCANNERS=Scanner(function=slicc_scanner,skeys=['.slicc'])) 64 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..." --- 68 unchanged lines hidden --- |