<div dir="ltr"><br><br><div class="gmail_quote">On Sat, Sep 6, 2008 at 12:43 AM, Greg Valure <span dir="ltr"><<a href="mailto:gregvalure@naturaldocs.org">gregvalure@naturaldocs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  

<div bgcolor="#ffffff" text="#000000"><div><div></div><div class="Wj3C7c">
Raphaël Pinson wrote:
<blockquote type="cite">
  <div dir="ltr"><br>
  <br>
  <div class="gmail_quote">On Fri, Sep 5, 2008 at 11:39 PM, Raphaël
Pinson <span dir="ltr"><<a href="mailto:raphink@gmail.com" target="_blank">raphink@gmail.com</a>></span> wrote:<br>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div dir="ltr"><br>
    <br>
    <div class="gmail_quote">
    <div>On Fri, Sep 5, 2008 at 11:32 PM, Raphaël Pinson
    <span dir="ltr"><<a href="mailto:raphink@gmail.com" target="_blank">raphink@gmail.com</a>></span>
wrote:<br>
    <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
      <div dir="ltr">Thank you for the quick answer!<br>
      <br>
I haven't had the time to try your changed yet, but I'm looking forward
to it.<br>
      <br>
      <br>
      <div class="gmail_quote">
      <div>On Fri, Sep 5, 2008 at 7:22 PM, Greg Valure <span dir="ltr"><<a href="mailto:gregvalure@naturaldocs.org" target="_blank">gregvalure@naturaldocs.org</a>></span> wrote:<br>
      <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">First
replace Topics.txt with this one.  You don't want the variable and lens
types to always be global, they should inherit their scope from the
module topic.  See here for more information about scope:<br>
        <br>
        <a href="http://www.naturaldocs.org/customizingtopics.html" target="_blank">http://www.naturaldocs.org/customizingtopics.html</a><br>
        <br>
Next replace Languages.txt with this one.  It adds prototype detection
using line breaks and "let" keywords to end them, and tells it to look
for a Perl module for some fine tuning.  See here for more information
on prototype detection:<br>
        <br>
        <a href="http://www.naturaldocs.org/customizinglanguages.html" target="_blank">http://www.naturaldocs.org/customizinglanguages.html</a><br>
        <br>
Add Augeas.pm to the [ND Dir]/Modules/NaturalDocs/Languages folder.
 Edit [ND Dir]/Modules/NaturalDocs/Languages.pm to add "use
NaturalDocs::Languages::Augeas" after all the rest.  From what I can
tell from the code a declaration continues until the next "let" or the
end of the file rather than having a set token.  This Perl module tells
it to accept a line break as a prototype ender but keep looking, so if
the code gets cut off by another comment it will still be accepted, and
also accept "let" as long as it's not the first one, so if another
statement appears it definitely ends but it doesn't get tripped up on
its own "let".<br>
      </blockquote>
      </div>
      <div><br>
That's the basic scheme indeed, with a few other keywords and
specificitiesm like<br>
      <br>
* you can have local variables, like<br>
      <br>
let var = <br>
    let local = some value in<br>
       some other value using local<br>
      <br>
* you can have tests, introduced by the keyword "test"<br>
      <br>
* you can have modules, introduced by the keyword "module", only one
module per file, at the beginning of the file<br>
      <br>
* you can have filters, introduced by the keyword "filter"<br>
So far, only modules and variables ("let" statements) are interesting
to document.</div>
      </div>
      </div>
    </blockquote>
    </div>
    <div><br>
    <br>
Also, variables can have parameters, with mandatory types, like:<br>
    <br>
let some_var (name:string) (kw:regexp) (entry:lens) =<br>
     some expression using the parameters<br>
    <br>
parameters can be typed as string, regexp or lens.<br>
    <br>
Lenses are variables that either use [ ]  in their definition, or refer
to a variable which is a lens. This is a major concept in augeas, and
it's somehow useful to make the difference between simple variables and
lenses (which you find in the code I sent you).<br>
    <br>
    </div>
    </div>
    </div>
  </blockquote>
  <div><br>
  <br>
Oh, and last, but not least... You probably noticed that we use
references like Util.eol, so "." is used as a package separator (if I'm
not wrong on the wording). Is that specified by adding a "Package
Separator" field to the "Augeas Module" definition? And if so, will it
append the module name with a dot before every variable automatically?<br>
  <br>
  <br>
 Raphael<br>
  <br>
  </div>
  </div>
  </div>
</blockquote>
<br></div></div>
Here's an updated Augeas.pm and Languages.txt which handles the "let x
= let y = ..." scenario.  It will ignore the "let" as an ender if it's
immediately preceded by an equals sign.  Lenses or variables with
parameters don't look like it would trip it up.<br>
<br>
The package separator defaults to "." when you don't specify it, so you
don't have to worry there.  It won't show the the variables as
"Util.eol" in the title but it knows that's what they are internally so
you can still link to them that way.  That's what the module's scope
was for, and why you don't want to break it with Section or Title tags.<br>
</div>

</blockquote><div><br><br>I just tried it. It works great, thank you so much.<br><br><br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
And I'm apparently not allowed to post to that mailing list you CC'd,
so if you want them to know about my responses you'll have to post them
yourself.</blockquote><div><br>Yes, they will see the answer  quoted in my replies, it's ok.<br><br><br>Thank you for your help and patience :)<br><br><br>Raphael <br></div><br></div></div><br></div>