2022-07-17 12:53:48 +00:00
|
|
|
definerule("bison",
|
2016-07-23 22:50:02 +00:00
|
|
|
{
|
|
|
|
srcs = { type="targets" },
|
|
|
|
commands = {
|
|
|
|
type="strings",
|
|
|
|
default={
|
2022-07-17 12:53:48 +00:00
|
|
|
"bison -t -b %{dir}/y -d %{ins}"
|
2016-07-23 22:50:02 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
function (e)
|
|
|
|
return normalrule {
|
|
|
|
name = e.name,
|
|
|
|
cwd = e.cwd,
|
|
|
|
ins = e.srcs,
|
|
|
|
outleaves = { "y.tab.c", "y.tab.h" },
|
|
|
|
label = e.label,
|
|
|
|
commands = e.commands,
|
|
|
|
}
|
|
|
|
end
|
|
|
|
)
|
|
|
|
|
2016-07-26 21:35:30 +00:00
|
|
|
definerule("flex",
|
|
|
|
{
|
|
|
|
srcs = { type="targets" },
|
|
|
|
commands = {
|
|
|
|
type="strings",
|
|
|
|
default={
|
|
|
|
"flex -s -t %{ins} > %{outs[1]}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
function (e)
|
|
|
|
return normalrule {
|
|
|
|
name = e.name,
|
|
|
|
cwd = e.cwd,
|
|
|
|
ins = e.srcs,
|
|
|
|
outleaves = { "lex.yy.c" },
|
|
|
|
label = e.label,
|
|
|
|
commands = e.commands
|
|
|
|
}
|
|
|
|
end
|
|
|
|
)
|
2016-07-23 22:50:02 +00:00
|
|
|
|