Hi,
I have implemented Rules for qlalr and flex in qbs but i'm facing an issue.
My qlarl rule is well working since the generated cpp file is a file
that is compiled.
But my flex rule is not working because the generated file is included
from another cpp file so is excluded from the files list.
When the rules.lex file is modified, ruleslexer.cpp is well generated
but the file which includes it (rulesparser.cpp) is not re compiled.
How can I do that?
BR
Olivier
----------------- rulesparser.cpp--------------------------
......
#include "ruleslexer.cpp"
......
Group{
name:"Source"
files:["*.cpp"]
excludeFiles:['ruleslexer.cpp']
}
Transformer{
inputs:"rules.lex"
Artifact{
fileName:path+"/ruleslexer.cpp"
}
prepare:{
var cmd = new JavaScriptCommand()
cmd.description = "Processing grammar lex and generate
"+output.filePath
cmd.highlight = "codegen"
cmd.sourceCode = function() {
var lexing = new Process();
lexing.setWorkingDirectory(FileInfo.path(output.filePath));
lexing.exec("C:/cygwin/bin/flex.exe",["-v","--noline",input.filePath]);
}
return cmd
}
}
_______________________________________________
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs