<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">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 class="Ih2E3d">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>