<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 10, 2014 at 3:59 PM, Tim Brigham <span dir="ltr"><<a href="mailto:timbrigham@gmail.com" target="_blank">timbrigham@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<p dir="ltr">>> I wanted to ask about how I'm handling one point in writing the lens for parsing my NASL files. <br>>><br>>> I'm using two cases for my end of line, those that end with a semicolon only and those that end with a closing parenthesis. e.g.<br>

>><br>>> let cparen      = del /\)/ ")"</p>
<p dir="ltr">>This is actually Util.del_str ")"</p></blockquote></div><div><span style="font-family:arial,sans-serif;font-size:13px">I'm aware that I duplicated the functionality of a couple of the Util.* statements. I was debugging some issues with my regexes and it was easier to have the exact values displayed on screen. </span> I'll get them converted back over to Util. statements eventually. :)</div>
<div class="im">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<p dir="ltr">>> let semic       = Util.del_str ";"<br>>> let dquote      = Util.del_str "\""</p>
<p dir="ltr">>It is better now to rely on the Quote module for safe/ automatic quote management.</p></blockquote></div><div>Can you please provide an example for this?  I've seen the quote module before don't have any experience with it. </div>
</div></div></div></blockquote><div><br></div><div>Sure. Here is your text parsed:</div><div><br></div><div><div>let entry =</div><div>  [ key Rx.word . Util.del_str "("</div><div>  . Quote.double</div><div>  . Util.del_str ");" . Util.eol ]</div>
<div><br></div><div>test entry get "script_copyright(\"This script is Copyright (C) 2004 Michel Arboi\");\n" = ?</div></div><div><br></div><div>$ augparse test.aug </div><div>Test result: test.aug:8.0-.92:</div>
<div>  { "script_copyright" = "This script is Copyright (C) 2004 Michel Arboi" }</div><div><br></div><div>Would that do?</div><div><br></div><div><br></div></div>-- <br><div dir="ltr">Raphaël Pinson<div>
Infrastructure Developer & Trainer</div><div>+33 479 26 57 93<div>+33 781 90 00 79</div><div><br></div><div>Camptocamp France<br>
Savoie Technolac<br>
BP 352<br>
48, avenue du Lac du Bourget<br>
73372 Le Bourget du Lac, Cedex<br>
<a href="http://www.camptocamp.com" target="_blank">www.camptocamp.com</a><br>
</div></div></div>
</div></div>