
more scan val els (scan val * more scan val els >):
	",",white stuff, ->,
	scan val(scan val>),
	more scan val els (more scan val els >);
more scan val els (empty>):.


scan fp list  ( out>):
   	"(", white stuff, ->,scan fp list  ( out>),
	")", white stuff;
scan fp list ( LIST * scan fp els >):
	"[",white stuff, scan fp els (scan fp els >), "]",white stuff.

scan fp els (scan fp * scan fp els >):
	scan fp(scan fp>),->,
	more scan fp els (scan fp els >);
scan fp els (empty>):.

more scan fp els (scan fp * more scan fp els >):
	",",white stuff, ->,
	scan fp(scan fp>),
	more scan fp els (more scan fp els >);
more scan fp els (empty>):.




scan i num (out >) : "(", white stuff,->, scan i num(out>),
	")", white stuff,->;
scan i num (I NUM * i num>) : !0123456789!+(inum>), white stuff.

scan f num (out >) : "(", white stuff,->, scan f num(out>),
	")", white stuff,->;
scan f num (F NUM * f num>) : !.+-eE0123456789!+(fnum>), white stuff.

scan string (out >) : "(", white stuff,->, scan string(out>),
	")", white stuff,->;
scan string (STRING*string>):quote,^!\n"!*(string>),quote,white stuff.

scan bool (out >) : "(", white stuff,->, scan bool(out>),
	")", white stuff,->;
scan bool (BOOL * True >) : "True", white stuff,->;
scan bool (BOOL * False >) : "False", white stuff.

scan symbol (out >) : "(", white stuff,->, scan symbol(out>),
	")", white stuff,->;
scan symbol (string>) : scan string (string>).
white stuff : !\n\t ! * (ign>).


%TEX
\section{Trans glass ds.} 

Transformation rules (rule names starting with the name {\em trans})
 as generated from {\tt mixedgl.ds}.
Addapted to meet the specifications.
%
  
macro def atom (>level,>node,>name,>VMacAlts*LIST*alt1*_): 
    where (>alt1,VMacLambda*_>), ->,
    add to (>name, >"Mac", >node);
macro def atom (>level, >node,>name,>VMacAlts*_): ->,
    add to (>name, >"Mac", >node);
macro def atom (>level, >node,>name,>VAtom*_): ->,
    top level (>level, >name),
    add to (>name, >"Atom", >node);
macro def atom (>level, >node,>name,>VMacLambda*_): ->,
    top level (>level, >name),
    add to (>name, >"Def", >node);
macro def atom (>level, >node,>name,>cs):
    top level (>level, >name),
    add to (>name, >"Aux", >node).

top level (>TOP, >name): 
    add to (>name, >TOP,>empty), ->;
top level (>_, >name):.

%TEX
\section{Walk kernal glass ds.} 

Print rules as generated from {\tt kerngl.ds}  
%

walk glass (>i,>glass,
		show glass>):
	walk def list (>i+I,>glass,show glass>).


walk def(>i,> DefAtom * atomorig * atomname * atptyp * atctyp,#
		i+"(DefAtom"+show atomorig+show atomname+show atptyp+show atctyp+")">): 
	walk orig (>i+I,>atomorig,show atomorig>),
	walk symbol (>i+I,>atomname,show atomname>),
	walk partyp list (>i+I,>atptyp,show atptyp>),
	walk typ (>i+I,>atctyp,show atctyp>), ->;
walk def(>i,> DefVal * valorig * valnm * valtyp * valas,#
	i+"(DefVal"+show valorig+show valnm+show valtyp+show valas+")">): 
	walk orig (>i+I,>valorig,show valorig>),
	walk symbol (>i+I,>valnm,show valnm>),
	walk typ (>i+I,>valtyp,show valtyp>),
	walk val (>i+I,>valas,show valas>), ->;
walk def(>i,> DefBasetype * baseorig * basename,#
		i+"(DefBasetype"+show baseorig+show basename+")">): 
	walk orig (>i+I,>baseorig,show baseorig>),
	walk symbol (>i+I,>basename,show basename>), ->;
walk def(>i,> DefCon * conorig * defcon * conas,#
		i+"(DefCon"+show conorig+show defcon+show conas+")">): 
	walk orig (>i+I,>conorig,show conorig>),
	walk val (>i+I,>defcon,show defcon>),
	walk val (>i+I,>conas,show conas>), ->;
walk def(>i,> DefTyp * typorig * deftyp * typas,#
		i+"(DefTyp"+show typorig+show deftyp+show typas+")">): 
	walk orig (>i+I,>typorig,show typorig>),
	walk symbol (>i+I,>deftyp,show deftyp>),
	walk typ (>i+I,>typas,show typas>), ->;
walk def(>i,> DefErr * errmsg, i+"(DefErr"+show errmsg+")">): 
        set exit code,
	walk string (>i+I,>errmsg,show errmsg>), ->;
walk def (>i, >err, i+"(DefErr \"*** Malformed definition\")\n">):
        set exit code.
