<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    <br>
    I have implemented Rules for qlalr and flex in qbs but i'm facing an
    issue. <br>
    My qlarl rule is well working since the generated cpp file is a file
    that is compiled. <br>
    But my flex rule is not working because the generated file is
    included from another cpp file so is excluded from the files list. <br>
    When the rules.lex file is modified, ruleslexer.cpp is well
    generated but the file which includes it (rulesparser.cpp) is not re
    compiled. <br>
    How can I do that? <br>
    <br>
    BR<br>
    <br>
    Olivier<br>
    <br>
    <br>
    <br>
    <br>
    ----------------- rulesparser.cpp--------------------------<br>
    ......<br>
    #include "ruleslexer.cpp"<br>
    ......<br>
    <br>
    Group{
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">name</span>:<span style=" color:#008000;">"Source"</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">files</span>:[<span style=" color:#008000;">"*.cpp"</span>]</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">excludeFiles</span>:[<span style=" color:#008000;">'ruleslexer.cpp'</span>]</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span>}</pre>
    <br>
    <span style=" color:#c0c0c0;"> </span>Transformer{
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">inputs</span>:<span style=" color:#008000;">"rules.lex"</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span>Artifact{</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                </span><span style=" color:#800000;">fileName</span>:path+<span style=" color:#008000;">"/ruleslexer.cpp"</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span>}</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">prepare</span>:{</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                </span><span style=" color:#808000;">var</span><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#2985c7;">cmd</span><span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span>JavaScriptCommand()</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                </span><span style=" font-style:italic; color:#2985c7;">cmd</span>.description<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Processing</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">grammar</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">lex</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">and</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">generate</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"</span>+output.filePath</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                </span><span style=" font-style:italic; color:#2985c7;">cmd</span>.highlight<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"codegen"</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                </span><span style=" font-style:italic; color:#2985c7;">cmd</span>.sourceCode<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">function</span>()<span style=" color:#c0c0c0;"> </span>{</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                    </span><span style=" color:#808000;">var</span><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#2985c7;">lexing</span><span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span>Process();</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                    </span><span style=" font-style:italic; color:#2985c7;">lexing</span>.setWorkingDirectory(FileInfo.path(output.filePath));</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                    </span><span style=" font-style:italic; color:#2985c7;">lexing</span>.exec(<span style=" color:#008000;">"C:/cygwin/bin/flex.exe"</span>,[<span style=" color:#008000;">"-v"</span>,<span style=" color:#008000;">"--noline"</span>,input.filePath]);</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                </span>}</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                </span><span style=" color:#808000;">return</span><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#2985c7;">cmd</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span>}</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span>}</pre>
     
  </body>
</html>