[CL] Clarification of section A.2.3.11 in 24707
Cameron Ross
cross at kojeware.com
Tue Dec 1 09:24:00 CST 2009
Hi Pat,
One final question in-line below:
Cameron.
Pat Hayes wrote:
>
> On Nov 30, 2009, at 3:24 PM, Cameron Ross wrote:
>
>> The 24707 defect report indicates that the productions in Section
>> A.2.3.11 should be written as:
>>
>> (a) phrase = sentence | module | ( open, 'cl-imports',
>> interpretablename, close ) | ( open, 'cl-comment', enclosedname
>> [cltext], close );
>
> as I recall, that last entry should be
>
> (open, 'cl-comment', (enclosedname | quotedstring), [cltext], close)
>
> This is to allow the use of either double or single quotes to enclose
> the comment text.
>
>>
>> (b) text = { phrase };
>>
>> (c) namedtext = open, 'cl-text', interpretablename, text, close;
>>
>> (d) cltext = module | namedtext | text;
>>
>>
>>
>> I have the following questions related to these productions:
>>
>> 1) What is the purpose of the last alternative in production (a)?
>
> To allow comments to be attached to top-level phrases and entire
> subtexts. For example
>
>
> (cl-text
> ...
> (cl-comment "these axioms are used to define algebraic properties"
> ...
> )
> ...
> )
>
> where each ... is a whole sequence of axioms (phrases). The use of
> enclosedname here is simply to allow the use of double quotes (as well
> as single quotes, c.f. earlier remark) to enclose comment text. The
> comment is not intended to be interpreted as a name semantically.
>
>>
>> 2) Given last alternative in production (a), what is the purpose of
>> production (c) given ?
>
> To attach a 'real' name to a text, this name being then used to import
> the text elsewhere. In this production, the name is understood to
> refer to the text.
>
I'm not sure if this is an implementation detail for my parser, or if
its a detail for the CLIF grammar...
I need to define a "starting rule" for my parser and production (b)
above seems a likely candidate. However, this choice would preclude
production (c) from being a "free-standing" sentence. That is, one
could not directly attach a name to a text to enable importation. I can
easily define my own starting rule, but I'm wondering if this is
something that should be stated explicitly within the CLIF grammar.
>>
>> 3) How do these relate to each other?
>
> Hardly at all.
>
>>
>> 4) Should [cltext] really be optional?
>
> Yes, to allow 'in-line' comments not enclosing any CL content, acting
> as 'headers' in the text.
>
> Pat
>
>
>>
>>
>>
>>
>> _______________________________________________
>> CL mailing list
>> CL at philebus.tamu.edu
>> http://philebus.tamu.edu/mailman/listinfo/cl
>>
>
> ------------------------------------------------------------
> IHMC (850)434 8903 or (650)494 3973
> 40 South Alcaniz St. (850)202 4416 office
> Pensacola (850)202 4440 fax
> FL 32502 (850)291 0667 mobile
> phayesAT-SIGNihmc.us http://www.ihmc.us/users/phayes
>
>
>
>
>
More information about the CL
mailing list