This project has moved. For the latest updates, please go here.
1
Vote

Repeating lists

description

I defined a production as
 
TrGUI_Hotspot ==> {:sint :sint} .
 
For an example input of
 
TrGUI_Hotspot
(
    4 2 
    1 1
    1 1
    5 5
    5 5
    5 5
    5 5
    5 5
    6 2
)
 
the program displays a list of 18 numbers one per line. I was expecting a display of 9 pairs of numbers with two numbers per line.
 
If it is not possible to display a pair of numbers on one line, could the number prefixes show which line the pair is from, 1 to 9, instead of 1 to 18.
 
When the BNF is defined as
 
TrGUI_Hotspot ==> {:sint,X :sint,Y} .
 
then the list is numbered from 1 to 9.

comments

JamesRoss wrote Jun 15, 2010 at 8:12 PM

The numbering is generated based on name duplication; i.e. any item which exists multiple times (be it "X" or "sint") causes them all to be numbered sequentially.

It may be possible (and I will look in to it) to identify repeated groups like {:sint :sint} and number them such that you get 1_1_sint, 1_2_sint, 2_1_sint, 2_2_sint, etc., but I think I'd rather just have them labelled to start with. :)

wrote Feb 14, 2013 at 3:24 AM