[QBS] flex

olivier musse olivier.musse at sfr.fr
Tue May 27 00:40:15 CEST 2014


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

             }

         }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20140527/f6042ec6/attachment.html>


More information about the Qbs mailing list