LLOOP Index | GSP Language | GSP Library | Framework Classes | Component Classes

iterations.gsp

This is the verbatim text of the file "iterations.gsp" part of the LLOOP package. The copyright remains with Michel MEHL. All rights reserved.



import int;
import word;

symbol point 
test
{{
  "valid iteration": pass file://test.txt file://expected.txt
}};

point ::=  { word } { { '(' int ',' int ',' int ')' } word 'linked' }   
{{
 printf("there are %d groups of linked points\n", $2(#));
 for (unsigned i=0; i < $2(#); i++)
   {
     printf("=> group no %d nb pts %d\n", i, $2(i, #));
     for (unsigned j=0; j < $2(i, #); j++)
       {
	 printf("   point %d=(%d,%d", j, (int)$2(i,j), (int)$3(i,j));
	 if (&4(i,j))
	   printf(",%d", (int)$4(i,j));
	 printf(")\n");
       }
   }
}}

This file is part of the LLOOP Reversible Object-Oriented Parser Generator. Copyright (c) 2005-2006 Michel MEHL, France. All rights reserved. LLOOP is distributed by the company ERSA SaRL.


Copyright (c) 2005-2006 Michel MEHL, Haguenau, France
LLOOP version 1.1