<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi all,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks to the developers who have coordinated efforts so smoothly for these doc strings in TDL. I am happy to report that for each of the following platforms, I have been able to successfully (compile and) load and run
the trunk version of the ERG suitably modified to use the new doc-string format for comments on all of the 1250 leaf lexical types in the grammar:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">LKB and LKB_FOS -- Using the latest versions available for download from the DELPH-IN LkbInstallation pages, both still require the ERG-supplied patch to
<span>the function read-tdl-type-comment</span>() in erg/lkb/patches.lsp, but with this patch, the grammar with new doc-strings loads and runs fine. It would be nice to have developer-approved versions of this function instead of the patch, since any other
grammar employing these new doc-strings will also currently need to include this patched version of the function.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">PET -- Using the latest `main' SVN branch, the updated grammar compiles, loads, and runs fine, with one surprising caveat: for some reason, two of the three files containing the new doc-strings (letypes.tdl and auxverbs.tdl)
will not compile unless they include a final commented-out line with a particular number of characters. See the note at the end of each of these files; it would be nice to chase down and correct this hiccup, though it might not be urgent. Other grammar developers
should monitor the behavior with their grammars in the meantime.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">ACE -- Using the `trunk' SVN version, the updated grammar compiles, loads, and runs fine. It would be good to now update the precompiled ACE binary on the ACE home page, so the ERG (and possibly other updated grammars)
will work.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I haven't yet checked to see if the latest PyDelphin is happy with this version, but will soon, unless Mike or Angie get there first (once I check in the ERG changes). I also don't know whether `agree' is ready to accept
the new doc-strings.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Next steps: <br>
</p>
<ol style="margin-bottom: 0px; margin-top: 0px;">
<li>I will check in the updated `trunk' ERG, and hope that the ACE binary on that home page will be updated soon, for those who might be using the trunk ERG but not compiling their own ACE.<br>
</li><li>It would be good to have the $LOGONROOT/uio/bin/linux.x86.64 binaries for `flop' and `cheap' updated to be consistent with the `main' branch of PET, since the existing ones cannot compile what I will check into the trunk ERG (soon to be stable version "2018").</li></ol>
<div><br>
</div>
<div>I'll hold off for a day in checking in the new ERG, in case anyone can foresee a reason for a different sequence of events to get us to a happier future consistent state of the world that embraces the new doc-strings.</div>
<div><br>
</div>
<div> Dan</div>
<div><br>
</div>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> goodman.m.w@gmail.com <goodman.m.w@gmail.com><br>
<b>Sent:</b> Tuesday, August 7, 2018 10:59 AM<br>
<b>To:</b> Woodley Packard<br>
<b>Cc:</b> Dan Flickinger; Francis Bond; Delph-in developers list<br>
<b>Subject:</b> Re: [developers] doc-strings in TDL for DELPH-IN</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div>
<div dir="ltr">
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks, Dan,</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">I'll do my part to update the wiki with the preferred syntax and add support into PyDelphin. Regarding the syntax description, it would be rather complicated to enforce one docstring
per type in the production rules if it's not in a fixed position, so I'll let it accept multiple per type and just make a note for implementers that only the first one must be preserved (with the action for additional docstrings left undefined).</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">And, Woodley, good catch on the regex bug. Those patterns should be negative lookahead assertions. I think the following works:<br>
</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif"> DocString := /"""([^"\\]|\\.|"(?!")|""(?!"))*"""/</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="x_gmail_default" style="font-family:arial,helvetica,sans-serif">Lookahead assertions can slow down regex searches, so this pattern is intended to be illustrative; a non-regex parser is fine as long as it also allows escaped characters (including
quotes) and up to two unescaped quotes not followed by a third quote. Also, if it's not clear from the pattern, newlines are acceptable within the triple-quoted strings.<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr">On Tue, Aug 7, 2018 at 12:28 AM Woodley Packard <<a href="mailto:sweaglesw@sweaglesw.org" id="LPlnk784023" class="OWAAutoLink" previewremoved="true">sweaglesw@sweaglesw.org</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div style="word-wrap:break-word">Hello docstringers,
<div><br>
</div>
<div>
<div style="margin:0px; line-height:normal">I have added to ACE the ability to detect and ignore triple-quoted strings anywhere within a TDL statement. I will leave it to others to determine and police legal placement. The (very lightly tested) update is
available in the ACE SVN trunk for those who wish to test it. I will be happy to make a binary release soon if bugs are not uncovered.</div>
</div>
<div><br>
</div>
<div>I have one nit to pick with the proposed regular expression for doc strings. The following docstring would be treated as terminating early, since the backslash is gobbled up without being interpreted:
<div><br>
</div>
<div>
<div style="margin:0px; line-height:normal">"""hello"\"""not done yet"""</div>
<div style="margin:0px; line-height:normal"><br>
</div>
<div style="margin:0px; line-height:normal">This one is legal in python (and handled properly by ACE :-)).</div>
<div style="margin:0px; line-height:normal"><br>
</div>
<div style="margin:0px; line-height:normal">Best,</div>
<div style="margin:0px; line-height:normal">-Woodley</div>
<div style="margin:0px; line-height:normal"><br>
</div>
<div>
<blockquote type="cite">
<div>On Aug 3, 2018, at 8:57 PM, Francis Bond <<a href="mailto:bond@ieee.org" target="_blank" id="LPlnk490326" class="OWAAutoLink" previewremoved="true">bond@ieee.org</a>> wrote:</div>
<br class="x_m_5455672210496114267Apple-interchange-newline">
<div><br style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<span style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; float:none; display:inline!important">DocString :=
/"""([^"</span><a style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px" id="LPlnk526090" class="OWAAutoLink" previewremoved="true">\\]</a><span style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; float:none; display:inline!important">|\\.|"[^"]|""[^"])*"""/
Spacing</span><br style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="x_gmail_signature">-Michael Wayne Goodman</div>
</div>
</div>
</div>
</body>
</html>