[developers] More TDL cobwebs

John Carroll J.A.Carroll at sussex.ac.uk
Fri Sep 7 13:58:42 CEST 2018


Hi,

I've been looking at TDL reading in the LKB, and (partly for pragmatic reasons) I suggest restricting docstrings to occur only in the position immediately preceding the AVM - or just before the final . terminator if there is no AVM. Here are my reasons:

1. The LKB currently only allows docstrings in that position, and changing this while retaining backward compatibility would require an unreasonable amount of patching in a grammar lkb/patches.lsp file
2. This position is analogous to where docstrings are allowed in programming languages / docstring packages

In the hope that this is acceptable, at least for the time being, I've sent Dan a new version of his patch to change docstrings from double-quoted to triple double-quoted in the LKB. The patch is attached in case other grammar developers want to pick it up.

John

On 7 Sep 2018, at 00:29, goodman.m.w at gmail.com<mailto:goodman.m.w at gmail.com> wrote:

Hi all,

There are some remaining issues with TDL that I'd like to clean up. First I will summarize some decisions made (or at least not rejected) in previous email threads:

1. Supertypes appear before other terms in a conjunction only by convention (not enforced in the syntax)
2. Docstrings are triple-quoted and may appear before any top-level term or before the final . terminator
3. Comments may appear in definitions anywhere that spaces can, except within strings/regexes/affixing-patterns

The following changes are things I think people agree with, so I'd like to consider them as decided:

4. Removal of the :< operator (if accepted as a variant of :=, throw a warning)
5. Removal of 'single-quoted-symbols
6. Removal of double-quoted "docstrings"
7. Removal of non-regex uses of ^ (otherwise any BNF of TDL is necessarily incomplete because the "extended-syntax" use of ^ is open-ended)

And there's at least one point I don't think we reached a decision on:

8. Instances must have exactly 1 "supertype" (which is really just a type and not a supertype, i.e., it doesn't change the type hierarchy)

Also:

9. Does anyone know how wild-cards differ from letter-sets? I see HaG has a wild-card and suffix pattern like these:

    %(wild-card (?g ui))
    ...
    %suffix (!c!v !c!vn) (!v?g !vn)
My guess is that wild-cards match but are not used in the replacement, which I can imagine is useful if you want the replacement to use the second of two matches but not the first. It makes me wonder why we don't just use regex substitutions for these things.

If nobody responds about (1)--(7), I'll make sure the syntax description on the TdlRfc wiki reflects those decisions.

--
-Michael Wayne Goodman


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20180907/270dc1bd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read-tdl-type-comment.lsp
Type: application/octet-stream
Size: 1828 bytes
Desc: read-tdl-type-comment.lsp
URL: <http://lists.delph-in.net/archives/developers/attachments/20180907/270dc1bd/attachment.obj>


More information about the developers mailing list