gruninger / Common-Logic

Documents for the developments of ISO 24707 Editiion 2 (Common Logic)
8 stars 3 forks source link

Ambiguous production rule in CLIF grammar (A.2.3.11 Phrase) #10

Open greenTara opened 11 years ago

greenTara commented 11 years ago
phrase = sentence | module | (open, 'cl:imports' , interpretablename , close) | (open,
'cl:comment', quotedstring, cltext, close);
cltext = { phrase } ;
namedtext = open, 'cl:text' interpretablename, text, close ;
cltext = module | namedtext | text ;

cltext occurs twice on the left side. The last line is probably right, and refers to the root of the grammar. (But see #40 for a new proposal to have documents at the root.)

But the first occurrence of cltext should be

text = { phrase }

(Thanks to Sören Schulze for spotting this problem!)

In phrase, the ambiguos cltext occurs on the right side. The thing that is commented upon should most likely be a list of phrases; therefore we suggest the following as a revision of the first line:

phrase = sentence | module | (open, 'cl:imports' , interpretablename , close) | (open,
'cl:comment', quotedstring, text, close);

There is one more occurrence of the ambiguous cltext in the standard, in A.2.3.10 Module:

module = open, 'cl:module' , interpretablename , [open, 'cl:excludes' , {name} , close ] , cltext, close;

We are quite sure that this should rather be

module = open, 'cl:module' , interpretablename , [open, 'cl:excludes' , {name} , close ] , text, close;

as it does not make sense that a module, which has a name, contains texts having different, possibly unrelated names.

(also reported by Pat Hayes)

clange commented 11 years ago

now copied #39 here; sorry that I didn't get it done earlier

greenTara commented 11 years ago

It was OK to close #39, as that was a duplicate, but the resolution of this issue has not yet been approved.

clange commented 11 years ago

Oops, I'm sorry about closing this, must have pressed the wrong button.