Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001057Core InformSource text and punctuationpublic2012-12-14 09:582014-05-07 07:34
Reportermattweiner 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.7
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0001057: can't use "(called [variable])" in a rule for an activity when the kind involved is a phrase with a parenthesis
DescriptionWhen defining an activity on a complex phrase with two arguments, such as phrase (thing, thing) -> number, it seems to be impossible to write a general rule that displays the argument. The compiler does not recognize the parenthetical "(called generic)", perhaps because there are already parentheses in the rule.
Minimal Source Text To Reproduce
Magrathea is a room.

To decide what number is the meaning of (life - a thing) applied to (universe - a thing) (this is lunkwalling): 
decide on 42.

Displaying something is an activity on phrase (thing, thing) -> number. 

For displaying a phrase (thing, thing) -> number (called generic):
	showme generic.
	
When play begins: carry out the displaying activity with lunkwalling.
Additional InformationCompilation fails with the following message:


Problem. You wrote 'For displaying a phrase (thing, thing) -> number (called generic)' , but the description of the thing(s) to which the rule applies ('a phrase (thing, thing) -> number (called generic)') did not make sense. This is a phrase (thing, thing) -> number based rulebook, so that should have described a phrase (thing, thing) -> number.

Note that if we write a rule that does not have the parenthetical (called generic), it compiles:

Magrathea is a room.

To decide what number is the meaning of (life - a thing) applied to (universe - a thing) (this is lunkwalling): decide on 42.

Displaying something is an activity on phrase (thing, thing) -> number.

For displaying a phrase (thing, thing) -> number:
showme lunkwalling.

When play begins: carry out the displaying activity with lunkwalling.

And if it were a phrase thing -> number, it would compile:

Magrathea is a room.

To decide what number is the meaning of (life - a thing) (this is lunkwalling): decide on 42.

Displaying something is an activity on phrase thing -> number.

For displaying a phrase thing -> number:
showme lunkwalling.

When play begins: carry out the displaying activity with lunkwalling.
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
(0001941)
EmacsUser (manager)
2012-12-14 12:10

Confirmed. A workaround:

- - - -
To decide what phrase (thing, thing) -> number is the phrase to display stored at (A - a number): (- {A} -).

For displaying a value (called the phrase address):
    let generic be the phrase to display stored at the phrase address;
    showme generic.
- - - -
(0002279)
graham (administrator)
2014-01-12 13:31

With the current version of the syntax analyser, this correctly produces:

"generic" = phrase (thing, thing) -> number: lunkwalling

- Issue History
Date Modified Username Field Change
2012-12-14 09:58 mattweiner New Issue
2012-12-14 12:10 EmacsUser Note Added: 0001941
2012-12-14 12:10 EmacsUser Status new => confirmed
2012-12-14 14:14 EmacsUser Category Activities => Source text and punctuation
2014-01-12 13:31 graham Note Added: 0002279
2014-01-12 13:31 graham Status confirmed => resolved
2014-01-12 13:31 graham Resolution open => fixed
2014-01-12 13:31 graham Assigned To => graham
2014-05-07 07:34 jmcgrew Fixed in Version => 6L02
2014-05-07 07:34 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker