[comp.sources.x] v03i085: Xcu -- widget set from Cornell University, Part09/12

argv@island.uu.net (Dan Heller) (04/27/89)

Submitted-by: Gene Dykes <gdykes@tcgould.tn.cornell.edu>
Posting-number: Volume 3, Issue 85
Archive-name: xcu/part09

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
#		"End of archive 9 (of 12)."
# Contents:  examples/xcursors/cursors.wc examples/xcursors/cursors.wl
#   examples/xlayout/manip.visible examples/xtbl/xtbl.c src/CuTbl.l
#   src/CuWlmP.h wlmCompiler/wlc.y
# Wrapped by argv@island on Mon Apr 24 15:41:59 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'examples/xcursors/cursors.wc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'examples/xcursors/cursors.wc'\"
else
echo shar: Extracting \"'examples/xcursors/cursors.wc'\" \(9170 characters\)
sed "s/^X//" >'examples/xcursors/cursors.wc' <<'END_OF_FILE'
X#WLDL
X3
X
X5 CuWlm
X6
X16 brightFacetColor 9 (SlateBlue) 6 Global
X13 dimFacetColor 13 (DarkSlateBlue) 6 Global
X10 foreground 5 (Black) 6 Global
X20 CuCommand.background 9 (Goldenrod) 6 Global
X24 CuCommand.internalHeight 2 (10) 6 Global
X10 facetWidth 1 (5) 6 Global
X0
X0
X1
X
X  5 CuTbl
X  3
X  10 background 5 (White) 5 Local
X  12 equalColumns 4 (True) 5 Local
X  12 formatString 21 (padding(5);c c c c c.) 5 Local
X  0
X  0
X  80
X
X    9 CuCommand
X    2
X    6 cursor 5 (xterm) 5 Local
X    4 name 5 (xterm) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (watch) 5 Local
X    4 name 5 (watch) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (ur_angle) 5 Local
X    4 name 8 (ur_angle) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (umbrella) 5 Local
X    4 name 8 (umbrella) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (ul_angle) 5 Local
X    4 name 8 (ul_angle) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 4 (trek) 5 Local
X    4 name 4 (trek) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 7 (top_tee) 5 Local
X    4 name 7 (top_tee) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (top_side) 5 Local
X    4 name 8 (top_side) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 16 (top_right_corner) 5 Local
X    4 name 16 (top_right_corner) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 15 (top_left_corner) 5 Local
X    4 name 15 (top_left_corner) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 14 (top_left_arrow) 5 Local
X    4 name 14 (top_left_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 6 (tcross) 5 Local
X    4 name 6 (tcross) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 6 (target) 5 Local
X    4 name 6 (target) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 4 (star) 5 Local
X    4 name 4 (star) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (spraycan) 5 Local
X    4 name 8 (spraycan) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 6 (spider) 5 Local
X    4 name 6 (spider) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 6 (sizing) 5 Local
X    4 name 6 (sizing) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 7 (shuttle) 5 Local
X    4 name 7 (shuttle) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 17 (sb_v_double_arrow) 5 Local
X    4 name 17 (sb_v_double_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 11 (sb_up_arrow) 5 Local
X    4 name 11 (sb_up_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 14 (sb_right_arrow) 5 Local
X    4 name 14 (sb_right_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 13 (sb_left_arrow) 5 Local
X    4 name 13 (sb_left_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 17 (sb_h_double_arrow) 5 Local
X    4 name 17 (sb_h_double_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 13 (sb_down_arrow) 5 Local
X    4 name 13 (sb_down_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (sailboat) 5 Local
X    4 name 8 (sailboat) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (rtl_logo) 5 Local
X    4 name 8 (rtl_logo) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 11 (rightbutton) 5 Local
X    4 name 11 (rightbutton) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 9 (right_tee) 5 Local
X    4 name 9 (right_tee) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 10 (right_side) 5 Local
X    4 name 10 (right_side) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 9 (right_ptr) 5 Local
X    4 name 9 (right_ptr) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 14 (question_arrow) 5 Local
X    4 name 14 (question_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 4 (plus) 5 Local
X    4 name 4 (plus) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 6 (pirate) 5 Local
X    4 name 6 (pirate) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 6 (pencil) 5 Local
X    4 name 6 (pencil) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (mouse) 5 Local
X    4 name 5 (mouse) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 12 (middlebutton) 5 Local
X    4 name 12 (middlebutton) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 3 (man) 5 Local
X    4 name 3 (man) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (lr_angle) 5 Local
X    4 name 8 (lr_angle) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (ll_angle) 5 Local
X    4 name 8 (ll_angle) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 10 (leftbutton) 5 Local
X    4 name 10 (leftbutton) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (left_tee) 5 Local
X    4 name 8 (left_tee) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 9 (left_side) 5 Local
X    4 name 9 (left_side) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (left_ptr) 5 Local
X    4 name 8 (left_ptr) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 10 (iron_cross) 5 Local
X    4 name 10 (iron_cross) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 4 (icon) 5 Local
X    4 name 4 (icon) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (heart) 5 Local
X    4 name 5 (heart) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (hand2) 5 Local
X    4 name 5 (hand2) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (hand1) 5 Local
X    4 name 5 (hand1) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (gumby) 5 Local
X    4 name 5 (gumby) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 7 (gobbler) 5 Local
X    4 name 7 (gobbler) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (fleur) 5 Local
X    4 name 5 (fleur) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (exchange) 5 Local
X    4 name 8 (exchange) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 10 (draped_box) 5 Local
X    4 name 10 (draped_box) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 11 (draft_small) 5 Local
X    4 name 11 (draft_small) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 11 (draft_large) 5 Local
X    4 name 11 (draft_large) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 12 (double_arrow) 5 Local
X    4 name 12 (double_arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 6 (dotbox) 5 Local
X    4 name 6 (dotbox) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 3 (dot) 5 Local
X    4 name 3 (dot) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 13 (diamond_cross) 5 Local
X    4 name 13 (diamond_cross) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 9 (crosshair) 5 Local
X    4 name 9 (crosshair) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 13 (cross_reverse) 5 Local
X    4 name 13 (cross_reverse) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (cross) 5 Local
X    4 name 5 (cross) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 10 (coffee_mug) 5 Local
X    4 name 10 (coffee_mug) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (clock) 5 Local
X    4 name 5 (clock) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 6 (circle) 5 Local
X    4 name 6 (circle) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 10 (center_ptr) 5 Local
X    4 name 10 (center_ptr) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 10 (box_spiral) 5 Local
X    4 name 10 (box_spiral) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 10 (bottom_tee) 5 Local
X    4 name 10 (bottom_tee) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 11 (bottom_side) 5 Local
X    4 name 11 (bottom_side) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 19 (bottom_right_corner) 5 Local
X    4 name 19 (bottom_right_corner) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 18 (bottom_left_corner) 5 Local
X    4 name 18 (bottom_left_corner) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (bogosity) 5 Local
X    4 name 8 (bogosity) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 4 (boat) 5 Local
X    4 name 4 (boat) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 14 (based_arrow_up) 5 Local
X    4 name 14 (based_arrow_up) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 16 (based_arrow_down) 5 Local
X    4 name 16 (based_arrow_down) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 5 (arrow) 5 Local
X    4 name 5 (arrow) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (X_cursor) 5 Local
X    4 name 8 (X_cursor) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (X_cursor) 5 Local
X    4 name 8 (X_cursor) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (X_cursor) 5 Local
X    4 name 8 (X_cursor) 5 Local
X    0
X    0
X    0
X
X    9 CuCommand
X    2
X    6 cursor 8 (X_cursor) 5 Local
X    4 name 8 (X_cursor) 5 Local
X    0
X    0
X    0

END_OF_FILE
echo shar: NEWLINE appended to \"'examples/xcursors/cursors.wc'\"
if test 9171 -ne `wc -c <'examples/xcursors/cursors.wc'`; then
    echo shar: \"'examples/xcursors/cursors.wc'\" unpacked with wrong size!
fi
# end of 'examples/xcursors/cursors.wc'
fi
if test -f 'examples/xcursors/cursors.wl' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'examples/xcursors/cursors.wl'\"
else
echo shar: Extracting \"'examples/xcursors/cursors.wl'\" \(4248 characters\)
sed "s/^X//" >'examples/xcursors/cursors.wl' <<'END_OF_FILE'
XCuWlm
X{
X*facetWidth "5"
X*CuCommand.internalHeight "10"
X*CuCommand.background "Goldenrod"
X*foreground "Black"
X*dimFacetColor "DarkSlateBlue"
X*brightFacetColor "SlateBlue"
XCuTbl {
X    formatString "padding(5);c c c c c."
X    equalColumns "True"
X    background "White"
XCuCommand { name "X_cursor" cursor "X_cursor" }
XCuCommand { name "X_cursor" cursor "X_cursor" }
XCuCommand { name "X_cursor" cursor "X_cursor" }
XCuCommand { name "X_cursor" cursor "X_cursor" }
XCuCommand { name "arrow" cursor "arrow" }
XCuCommand { name "based_arrow_down" cursor "based_arrow_down" }
XCuCommand { name "based_arrow_up" cursor "based_arrow_up" }
XCuCommand { name "boat" cursor "boat" }
XCuCommand { name "bogosity" cursor "bogosity" }
XCuCommand { name "bottom_left_corner" cursor "bottom_left_corner" }
XCuCommand { name "bottom_right_corner" cursor "bottom_right_corner" }
XCuCommand { name "bottom_side" cursor "bottom_side" }
XCuCommand { name "bottom_tee" cursor "bottom_tee" }
XCuCommand { name "box_spiral" cursor "box_spiral" }
XCuCommand { name "center_ptr" cursor "center_ptr" }
XCuCommand { name "circle" cursor "circle" }
XCuCommand { name "clock" cursor "clock" }
XCuCommand { name "coffee_mug" cursor "coffee_mug" }
XCuCommand { name "cross" cursor "cross" }
XCuCommand { name "cross_reverse" cursor "cross_reverse" }
XCuCommand { name "crosshair" cursor "crosshair" }
XCuCommand { name "diamond_cross" cursor "diamond_cross" }
XCuCommand { name "dot" cursor "dot" }
XCuCommand { name "dotbox" cursor "dotbox" }
XCuCommand { name "double_arrow" cursor "double_arrow" }
XCuCommand { name "draft_large" cursor "draft_large" }
XCuCommand { name "draft_small" cursor "draft_small" }
XCuCommand { name "draped_box" cursor "draped_box" }
XCuCommand { name "exchange" cursor "exchange" }
XCuCommand { name "fleur" cursor "fleur" }
XCuCommand { name "gobbler" cursor "gobbler" }
XCuCommand { name "gumby" cursor "gumby" }
XCuCommand { name "hand1" cursor "hand1" }
XCuCommand { name "hand2" cursor "hand2" }
XCuCommand { name "heart" cursor "heart" }
XCuCommand { name "icon" cursor "icon" }
XCuCommand { name "iron_cross" cursor "iron_cross" }
XCuCommand { name "left_ptr" cursor "left_ptr" }
XCuCommand { name "left_side" cursor "left_side" }
XCuCommand { name "left_tee" cursor "left_tee" }
XCuCommand { name "leftbutton" cursor "leftbutton" }
XCuCommand { name "ll_angle" cursor "ll_angle" }
XCuCommand { name "lr_angle" cursor "lr_angle" }
XCuCommand { name "man" cursor "man" }
XCuCommand { name "middlebutton" cursor "middlebutton" }
XCuCommand { name "mouse" cursor "mouse" }
XCuCommand { name "pencil" cursor "pencil" }
XCuCommand { name "pirate" cursor "pirate" }
XCuCommand { name "plus" cursor "plus" }
XCuCommand { name "question_arrow" cursor "question_arrow" }
XCuCommand { name "right_ptr" cursor "right_ptr" }
XCuCommand { name "right_side" cursor "right_side" }
XCuCommand { name "right_tee" cursor "right_tee" }
XCuCommand { name "rightbutton" cursor "rightbutton" }
XCuCommand { name "rtl_logo" cursor "rtl_logo" }
XCuCommand { name "sailboat" cursor "sailboat" }
XCuCommand { name "sb_down_arrow" cursor "sb_down_arrow" }
XCuCommand { name "sb_h_double_arrow" cursor "sb_h_double_arrow" }
XCuCommand { name "sb_left_arrow" cursor "sb_left_arrow" }
XCuCommand { name "sb_right_arrow" cursor "sb_right_arrow" }
XCuCommand { name "sb_up_arrow" cursor "sb_up_arrow" }
XCuCommand { name "sb_v_double_arrow" cursor "sb_v_double_arrow" }
XCuCommand { name "shuttle" cursor "shuttle" }
XCuCommand { name "sizing" cursor "sizing" }
XCuCommand { name "spider" cursor "spider" }
XCuCommand { name "spraycan" cursor "spraycan" }
XCuCommand { name "star" cursor "star" }
XCuCommand { name "target" cursor "target" }
XCuCommand { name "tcross" cursor "tcross" }
XCuCommand { name "top_left_arrow" cursor "top_left_arrow" }
XCuCommand { name "top_left_corner" cursor "top_left_corner" }
XCuCommand { name "top_right_corner" cursor "top_right_corner" }
XCuCommand { name "top_side" cursor "top_side" }
XCuCommand { name "top_tee" cursor "top_tee" }
XCuCommand { name "trek" cursor "trek" }
XCuCommand { name "ul_angle" cursor "ul_angle" }
XCuCommand { name "umbrella" cursor "umbrella" }
XCuCommand { name "ur_angle" cursor "ur_angle" }
XCuCommand { name "watch" cursor "watch" }
XCuCommand { name "xterm" cursor "xterm" }
X    }
X}

END_OF_FILE
echo shar: NEWLINE appended to \"'examples/xcursors/cursors.wl'\"
if test 4249 -ne `wc -c <'examples/xcursors/cursors.wl'`; then
    echo shar: \"'examples/xcursors/cursors.wl'\" unpacked with wrong size!
fi
# end of 'examples/xcursors/cursors.wl'
fi
if test -f 'examples/xlayout/manip.visible' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'examples/xlayout/manip.visible'\"
else
echo shar: Extracting \"'examples/xlayout/manip.visible'\" \(7595 characters\)
sed "s/^X//" >'examples/xlayout/manip.visible' <<'END_OF_FILE'
XCuTbl
X    {
X    /* mappedWhenManaged "False" */
X    name "visible"
X    formatString "c."
X    interHeight "10"
X    internalWidth "10"
X    internalHeight "10"
X
X    CuTbl
X	{
X	name "translation"
X	formatString "c\nc\nc."
X	CuTbl
X	    {
X	    name "A1"
X	    formatString "c c c."
X	    CuLabel { name "TX" }
X	    CuLabel { name "TY" }
X	    CuLabel { name "TZ" }
X	    }
X	CuTbl
X	    {
X	    name "A2"
X	    formatString "c c c."
X	    interWidth "2"
X/*
XTODO : CuBmgr : XtCuBmgrAtMostOne
XTODO : UnsetChildren (Deck, Tbl, Wlm, future geoMgrs)
XTODO : if callback () action 1, action 2...
XTODO : associate tags with widgets, action (tag) implies for all assoc'd ones
X*/
X	    CuTbl
X		{
X		name "tx"
X		formatString "c c.\n"
X		CuButton { name "tx_negative" label "-" set "True" }
X		CuButton { name "tx_positive" label "+" }
X		}
X	    CuTbl
X		{
X		name "ty"
X		formatString "c c.\n"
X		CuButton { name "ty_negative" label "-" }
X		CuButton { name "ty_positive" label "+" }
X		}
X	    CuTbl
X		{
X		name "tz"
X		formatString "c c.\n"
X		CuButton { name "tz_negative" label "-" }
X		CuButton { name "tz_positive" label "+" }
X		}
X	    }
X
X	CuTbl
X	    {
X	    name "A3"
X	    formatString "c c c."
X	    equalColumns "True"
X	    CuBmgr
X		{
X		name "translate_value"
X		bmgrType "OneOfMany"
X		manage "translate.1" : Float "0.1"
X		       "translate.5" : Float "0.5"
X		       "translate1" : Float "1.0"
X		       "translate2" : Float "2.0"
X		       "translate4" : Float "4.0"
X		       "translate10" : Float "10.0"
X		CuButton { name "translate.1" label ".1" }
X		CuButton { name "translate.5" label ".5" }
X		CuButton { name "translate1" label "1" set "True" }
X		CuButton { name "translate2" label "2" }
X		CuButton { name "translate4" label "4" }
X		CuButton { name "translate10" label "10" }
X		}
X	    }
X	}
X
X    CuTbl
X	{
X	name "rotation"
X	formatString "c\nc\nc."
X	CuTbl
X	    {
X	    name "A4"
X	    formatString "c c c."
X	    CuLabel { name "RX" }
X	    CuLabel { name "RY" }
X	    CuLabel { name "  " }
X	    }
X	CuTbl
X	    {
X	    name "A5"
X	    formatString "c c c."
X	    interWidth "2"
X	    CuTbl
X		{
X		name "rx"
X		formatString "c c.\n"
X		CuButton { name "rx_negative" label "-" }
X		CuButton { name "rx_positive" label "+" }
X		}
X	    CuTbl
X		{
X		name "ry"
X		formatString "c c.\n"
X		CuButton { name "ry_negative" label "-" }
X		CuButton { name "ry_positive" label "+" }
X		}
X	    CuTbl
X		{
X		name "rz"
X		formatString "c c.\n"
X		mappedWhenManaged "False"  /* Currently no rotation here */
X		layoutWhenUnmapped "True"
X		CuButton { name "rz_negative" label "-" }
X		CuButton { name "rz_positive" label "+" }
X		}
X	    }
X
X	CuTbl
X	    {
X	    name "A6"
X	    formatString "c c c."
X	    equalColumns "True"
X	    CuBmgr
X		{
X		name "rotate_value"
X		bmgrType "OneOfMany"
X		manage
X			"rotate1" : Float "1"
X		       "rotate2" : Float "2"
X		       "rotate5" : Float "5"
X		       "rotate10" : Float "10" /* 10.0 => BOMB!!! */
X		       "rotate30" : Float "30.0"
X		       "rotate90" : Float "90.0"
X		CuButton { name "rotate1" label "1" }
X		CuButton { name "rotate2" label "2" }
X		CuButton { name "rotate5" label "5" set "True" }
X		CuButton { name "rotate10" label "10" }
X		CuButton { name "rotate30" label "30" }
X		CuButton { name "rotate90" label "90" }
X		}
X	    }
X	}
X
X    CuTbl
X	{
X	name "zoom_scene"
X	formatString "c\nc\nc."
X	CuTbl
X	    {
X	    name "A7"
X	    formatString "c c c."
X	    CuLabel { name "ZM" }
X	    CuLabel { name "  " }
X	    CuLabel { name "SC" }
X	    }
X	CuTbl
X	    {
X	    name "A8"
X	    formatString "c c c."
X	    interWidth "2"
X	    CuTbl
X		{
X		name "zm"
X		formatString "c c.\n"
X		CuButton { name "zm_negative" label "-" }
X		CuButton { name "zm_positive" label "+" }
X		}
X	    CuTbl
X		{
X		name "A8a"
X		formatString "c c.\n"
X		mappedWhenManaged "False"  /* Currently no operation here */
X		layoutWhenUnmapped "True"
X		CuButton { name " " label "-" }
X		CuButton { name " " label "+" }
X		}
X	    CuTbl
X		{
X		name "sc"
X		formatString "c c.\n"
X		CuButton { name "sc_negative" label "-" }
X		CuButton { name "sc_positive" label "+" }
X		}
X	    }
X
X	CuTbl
X	    {
X	    name "A9"
X	    formatString "c c\nc c c."
X	    equalColumns "True"
X	    CuBmgr
X		{
X		name "zoom_value"
X		bmgrType "OneOfMany"
X		manage
X		       "zoom0" : Float "0"
X		       "zoom.5" : Float "0.5"
X		       "zoom.9" : Float "0.9"
X		       "zoom1.1" : Float "1.1"
X		       "zoom1.5" : Float "1.5"
X		CuButton { name "zoom0" label "RS" }
X		CuButton { name "zoom.5" label ".5" }
X		CuButton { name "zoom.9" label ".9" }
X		CuButton { name "zoom1.1" label "1.1" set "True" }
X		CuButton { name "zoom1.5" label "1.5" }
X		}
X	    }
X	}
X
X    CuTbl
X	{
X	name "hi_yo"
X	formatString "c\nc\nc."
X	CuTbl
X	    {
X	    equalColumns "True"
X	    formatString "c c."
X	    *foreground "black"
X	    *facetWidth "0"
X	    CuLabel { name "HITHER" }
X	    CuLabel { name "YON" }
X	    }
X	CuTbl
X	    {
X	    formatString "c c."
X	    interWidth "2"
X	    CuTbl
X		{
X		name "hi"
X		formatString "c c.\n"
X		CuButton { name "hi_negative" label "-" }
X		CuButton { name "hi_positive" label "+" }
X		}
X	    CuTbl
X		{
X		name "yo"
X		formatString "c c.\n"
X		CuButton { name "yo_negative" label "-" }
X		CuButton { name "yo_positive" label "+" }
X		}
X	    }
X
X	CuTbl
X	    {
X	    name "A10"
X	    formatString "c c c."
X	    equalColumns "True"
X	    CuBmgr
X		{
X		name "hy_value"
X		bmgrType "OneOfMany"
X		manage
X		       "hy0" : Float "0"
X		       "hy.1" : Float "0.1"
X		       "hy1" : Float "1.0"
X		       "hy2" : Float "2.0"
X		       "hy4" : Float "4.0"
X		       "hy8" : Float "8.0"
X		CuButton { name "hy0" label "RS" }
X		CuButton { name "hy.1" label ".1" }
X		CuButton { name "hy1" label "1" }
X		CuButton { name "hy2" label "2" }
X		CuButton { name "hy4" label "4" set "True" }
X		CuButton { name "hy8" label "8" }
X		}
X	    }
X	}
X    CuTbl
X	{
X	formatString "c c."
X	equalColumns "True"
X	CuBmgr
X	    {
X	    name "cycle"
X	    bmgrType "DoubleToggle"
X	    manage "CYCLE ON" : Int "1" "CYCLE OFF" : Int "0"
X	    CuButton { name "CYCLE OFF" set "True" }
X	    CuButton { name "CYCLE ON" }
X	    }
X	}
X    CuTbl
X	{
X	formatString "c c."
X	equalColumns "True"
X	CuBmgr
X	    {
X	    name "up"
X	    bmgrType "DoubleToggle"
X	    manage "UP\nCONSTANT" : Int "1" "UP\nVARIABLE" : Int "0"
X	    CuButton { name "UP\nCONSTANT" set "True" }
X	    CuButton { name "UP\nVARIABLE" }
X	    }
X	}
X
X    CuTbl
X	{
X	formatString "c c."
X	equalColumns "True"
X	CuBmgr
X	    {
X	    name "dbl_buffer"
X	    bmgrType "DoubleToggle"
X	    manage "DBL\nBUFFER\nON" : Int "1" "DBL\nBUFFER\nOFF" : Int "0"
X	    CuButton { name "DBL\nBUFFER\nON" set "True" }
X	    CuButton { name "DBL\nBUFFER\nOFF" }
X	    }
X	}
X
X    CuTbl
X	{
X	    name "A11"
X	formatString "c\nc\nc."
X	CuBmgr
X	    {
X	    name "read_write"
X	    bmgrType "OneOfMany"
X	    manage "REPLAY" "RECORD" "OFF"
X	    CuButton { name "REPLAY" }
X	    CuButton { name "RECORD" }
X	    CuButton { name "OFF" set "True" }
X	    }
X	}
X
X    CuTbl
X	{
X	formatString "c."
X	CuBmgr
X	    {
X	    name "reset"
X	    bmgrType "Transient"
X	    manage "RESET"
X	    CuButton { name "RESET" }
X	    }
X	}
X    CuTbl
X	{
X	formatString "c."
X	CuBmgr
X	    {
X	    name "texture"
X	    bmgrType "Transient"
X	    manage "TEXTURE"
X	    CuButton { name "TEXTURE" }
X	    }
X	}
X    CuTbl
X	{
X	formatString "c."
X	CuBmgr
X	    {
X	    name "quit"
X	    bmgrType "Transient"
X	    manage "QUIT"
X	    CuButton { name "QUIT" }
X	    }
X	}
X    }
X
XCuBmgr
X    {
X    name "plus_minus"
X    bmgrType "OneOfMany"
X    manage "tx_positive" "tx_negative"
X	   "ty_positive" "ty_negative"
X	   "tz_positive" "tz_negative"
X	   "rx_positive" "rx_negative"
X	   "ry_positive" "ry_negative"
X	   "zm_positive" "zm_negative"
X	   "sc_positive" "sc_negative"
X	   "hi_positive" "hi_negative"
X	   "yo_positive" "yo_negative"
X    }
X

END_OF_FILE
echo shar: NEWLINE appended to \"'examples/xlayout/manip.visible'\"
if test 7596 -ne `wc -c <'examples/xlayout/manip.visible'`; then
    echo shar: \"'examples/xlayout/manip.visible'\" unpacked with wrong size!
fi
# end of 'examples/xlayout/manip.visible'
fi
if test -f 'examples/xtbl/xtbl.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'examples/xtbl/xtbl.c'\"
else
echo shar: Extracting \"'examples/xtbl/xtbl.c'\" \(7660 characters\)
sed "s/^X//" >'examples/xtbl/xtbl.c' <<'END_OF_FILE'
X#include <stdio.h>
X#include <X11/Intrinsic.h>
X#include <X11/Cardinals.h>
X#include <X11/StringDefs.h>
X#include <X11/Shell.h>
X#include "CuWlm.h"
X#include "CuSimple.h"
X#include "CuLabel.h"
X#include "CuTbl.h"
X#include "CuCommand.h"
X
Xstatic void Activate_text() ;
Xstatic void Activate_justify() ;
Xstatic void Activate_gravity() ;
Xstatic void Activate_fill() ;
Xstatic void convert_nl () ;
X
Xstatic XtCallbackRec callback_text[] =
X    { { Activate_text, NULL }	,{ NULL, NULL } } ;
X
Xstatic XtCallbackRec callback_justify[] =
X    { { Activate_justify, NULL },{ NULL, NULL } } ;
X
Xstatic XtCallbackRec callback_gravity[] =
X    { { Activate_gravity, NULL },{ NULL, NULL } } ;
X
Xstatic XtCallbackRec callback_fill[] =
X    { { Activate_fill, NULL }	,{ NULL, NULL } } ;
X
Xstatic XrmOptionDescRec options[] =
X{
X {"-file",	"*tbl1a.formatFile",	XrmoptionSepArg,	NULL}
X,{"-string",	"*tbl1a.formatString",	XrmoptionSepArg,	NULL}
X};
X
XWidget toplevel;
XWidget lbl[100] ;
XWidget tbl0, tbl1a, tbl1b ;
Xstatic char lbl_text[100] ;
XCardinal n_widgets ;
X
Xstatic Arg cmd_arg[2] ;
X
Xstatic Arg lbl_args[] =
X    {
X     {XtNlabel, (XtArgVal) lbl_text}
X    ,{XtNfacetWidth, (XtArgVal) 0}
X    ,{XtNjustify, (XtArgVal) CuJustifyCenter}
X    } ;
X
Xstatic Arg tbl0_args[] =
X    {
X     {XtNformatString, (XtArgVal) "c c."}
X    ,{XtNinterWidth, (XtArgVal) 10}
X    ,{XtNinterHeight, (XtArgVal) 10}
X    ,{XtNinternalWidth, (XtArgVal) 10}
X    ,{XtNinternalHeight, (XtArgVal) 10}
X    } ;
X
Xstatic Arg tbl1b_args[] =
X    {
X     {XtNformatString, (XtArgVal) "c."}
X    ,{XtNinterHeight, (XtArgVal) -1}
X    ,{XtNinternalWidth, (XtArgVal) 10}
X    ,{XtNinternalHeight, (XtArgVal) 10}
X    } ;
X
Xvoid
Xmain (argc, argv)
X    unsigned int argc;
X    char **argv;
X{
XCardinal i ;
X
Xstatic Arg toplevel_args[] =
X    {
X    {XtNallowShellResize, (XtArgVal) True}
X    } ;
X
Xif (argc < 4)
X	{
X	fprintf (stderr, "Usage: %s #_of_widgets\n", argv[0]) ;
X	fprintf (stderr, "          [-file widget_description_file]\n") ;
X	fprintf (stderr, "          [-string widget_description]\n") ;
X	fprintf (stderr, "          ... (see source)\n") ;
X	exit (1) ;
X	}
X
X
Xn_widgets = atoi (argv[1]) ;
X
Xtoplevel = XtInitialize (NULL, "Demo", options, XtNumber(options), &argc, argv);
X
X/*
X * tbl0 merely places the two layouts side by side
X * tbl1a is the variable test layout
X * tbl1b is the fixed cmd modifier layout
X */
X
Xtbl0 = XtCreateManagedWidget ("tbl0", cuTblWidgetClass, toplevel,
X				tbl0_args, XtNumber(tbl0_args)) ;
Xtbl1a = XtCreateManagedWidget ("tbl1a", cuTblWidgetClass, tbl0, NULL, NULL) ;
Xtbl1b = XtCreateManagedWidget ("tbl1b", cuTblWidgetClass, tbl0,
X				tbl1b_args, XtNumber(tbl1b_args)) ;
X
X/*
X * load up the test layout with label widgets
X */
X
Xfor (i=0; i < n_widgets;  i++)
X    {
X    char widget_name[100] ;
X
X    sprintf (lbl_text, "ABC\n%d", i) ;
X    sprintf (widget_name, "Wdgt%d", i) ;
X    lbl[i] = XtCreateManagedWidget (widget_name, cuLabelWidgetClass, tbl1a,
X				    lbl_args, TWO) ;
X    }
X
X/*
X * load up the cmd layout with command widgets
X */
X
XXtSetArg (cmd_arg[1], XtNfacetWidth, (XtArgVal) 0) ;
XXtSetArg (cmd_arg[0], XtNcallback, (XtArgVal) callback_text) ;
Xlbl[i++] = XtCreateManagedWidget ("_text_", cuCommandWidgetClass, tbl1b,
X				cmd_arg, TWO) ;
X
XXtSetArg (cmd_arg[0], XtNcallback, (XtArgVal) callback_justify) ;
Xlbl[i++] = XtCreateManagedWidget ("_justify_", cuCommandWidgetClass, tbl1b,
X				cmd_arg, TWO) ;
X
XXtSetArg (cmd_arg[0], XtNcallback, (XtArgVal) callback_gravity) ;
Xlbl[i++] = XtCreateManagedWidget ("_gravity_", cuCommandWidgetClass, tbl1b,
X				cmd_arg, TWO) ;
X
XXtSetArg (cmd_arg[0], XtNcallback, (XtArgVal) callback_fill) ;
Xlbl[i++] = XtCreateManagedWidget ("_fill_", cuCommandWidgetClass, tbl1b,
X				cmd_arg, TWO) ;
X
X/*
X * go...
X */
X
Xsleep (5) ;
XXtRealizeWidget (toplevel) ;
XXtSetValues (toplevel, toplevel_args, XtNumber(toplevel_args)) ;
XXtMainLoop () ;
X}
X
X/*
X * The following four routines all work the same way.
X * They open a file of the same name as the label.
X * The first integer read is the number of widgets to modify
X * This is followed by pairs of widget numbers and new values
X */
X
X/**
X *** Modifies the label of a widget
X **/
X
X#include <X11/IntrinsicP.h>
X#include "CuTblP.h"
X
Xstatic void
XActivate_text (w, closure, call_data)
X    Widget w;
X    caddr_t closure;
X    caddr_t call_data;
X{
XFILE *fd ;
XCardinal i, n ;
Xint m ;
X
Xfd = fopen ("_text_", "r") ;
Xif (fd <= 0)
X	fprintf (stderr, "NO _text_ file!\n") ;
Xfscanf (fd, "%d", &n) ;
Xfor (i=0;  i < n;  i++)
X	{
X	fscanf (fd, "%d", &m) ;
X	fread (lbl_text, 1, 1, fd) ;
X	fscanf (fd, "%[^\n]s", lbl_text) ;
X	if (m < 0 || m >= n_widgets)
X		{
X		fprintf (stderr, "Error: widget %d does not exist\n", m) ;
X		continue ;
X		}
X	convert_nl (lbl_text) ;
X	XtSetValues (lbl[m], lbl_args, ONE) ;
X	}
Xfclose (fd) ;
Xreturn ;
X}
X
X/**
X *** Modifies the justification of the label of a widget
X **/
X
Xstatic void
XActivate_justify (w, closure, call_data)
X    Widget w;
X    caddr_t closure;
X    caddr_t call_data;
X{
XFILE *fd ;
XCardinal i, n ;
Xint m ;
XXrmValue from, to ;
X
Xfrom.size = sizeof (String) ;
Xfrom.addr = (caddr_t) lbl_text ;
X
Xfd = fopen ("_justify_", "r") ;
Xif (fd <= 0)
X	fprintf (stderr, "NO _justify_ file!\n") ;
Xfscanf (fd, "%d", &n) ;
X
Xfor (i=0;  i < n;  i++)
X	{
X	fscanf (fd, "%d", &m) ;
X	fscanf (fd, "%s", lbl_text) ;
X	if (m < 0 || m >= n_widgets)
X		{
X		fprintf (stderr, "Error: widget %d does not exist\n", m) ;
X		continue ;
X		}
X	XtConvert (toplevel, XtRString, &from, XtRJustify, &to) ;
X	XtSetArg(lbl_args[2], XtNjustify, (XtArgVal) (*((CuJustify *)to.addr)));
X	XtSetValues (lbl[m], &lbl_args[2], ONE) ;
X	}
Xfclose (fd) ;
Xreturn ;
X}
X
X/**
X *** Modifies the gravity of a widget
X **/
X
Xstatic void
XActivate_gravity (w, closure, call_data)
X    Widget w;
X    caddr_t closure;
X    caddr_t call_data;
X{
XFILE *fd ;
XCardinal i, n ;
Xint m ;
XXrmValue from, to ;
X
Xfrom.size = sizeof (String) ;
Xfrom.addr = (caddr_t) lbl_text ;
X
Xfd = fopen ("_gravity_", "r") ;
Xif (fd <= 0)
X	fprintf (stderr, "NO _gravity_ file!\n") ;
Xfscanf (fd, "%d", &n) ;
X
Xfor (i=0;  i < n;  i++)
X	{
X	CuLabelWidget lw ;
X
X	fscanf (fd, "%d", &m) ;
X	fscanf (fd, "%s", lbl_text) ;
X	if (m < 0 || m >= n_widgets)
X		{
X		fprintf (stderr, "Error: widget %d does not exist\n", m) ;
X		continue ;
X		}
X	XtConvert (toplevel, XtRString, &from, XtRGravity, &to) ;
X	XtSetArg(lbl_args[2], XtNgravity, (XtArgVal) (*((CuGravity *)to.addr)));
X	lw = (CuLabelWidget) lbl[m] ;
X	XtSetValues (lbl[m], &lbl_args[2], ONE) ;
X	}
Xfclose (fd) ;
Xreturn ;
X}
X
X/**
X *** Modifies the fill mode of a widget
X **/
X
Xstatic void
XActivate_fill (w, closure, call_data)
X    Widget w;
X    caddr_t closure;
X    caddr_t call_data;
X{
XFILE *fd ;
XCardinal i, n ;
Xint m ;
XXrmValue from, to ;
X
Xfrom.size = sizeof (String) ;
Xfrom.addr = (caddr_t) lbl_text ;
X
Xfd = fopen ("_fill_", "r") ;
Xif (fd <= 0)
X	fprintf (stderr, "NO _fill_ file!\n") ;
Xfscanf (fd, "%d", &n) ;
X
Xfor (i=0;  i < n;  i++)
X	{
X	CuLabelWidget lw ;
X
X	fscanf (fd, "%d", &m) ;
X	fscanf (fd, "%s", lbl_text) ;
X	if (m < 0 || m >= n_widgets)
X		{
X		fprintf (stderr, "Error: widget %d does not exist\n", m) ;
X		continue ;
X		}
X	XtConvert (toplevel, XtRString, &from, XtRBoolean, &to) ;
X	XtSetArg(lbl_args[2], XtNfillColumn, (XtArgVal)(*((Boolean *)to.addr)));
X	lw = (CuLabelWidget) lbl[m] ;
X	XtSetValues (lbl[m], &lbl_args[2], ONE) ;
X	}
Xfclose (fd) ;
Xreturn ;
X}
X
X/***** **** *** ** * convert_nl * ** *** **** *****/
X
X/*
X * convert instances of "\n" into '\n' and collapse the remainder of the text
X */
X
Xstatic void
Xconvert_nl (text)
X    char *text ;
X{
XCardinal i, j ;
XCardinal len = strlen(text) ;
X
Xfor (i=0;  i < len;  i++)
X    {
X    if (text[i] == '\\' && text[i+1] == 'n')
X	{
X	text[i] = '\n' ;
X	j = i+1 ;
X	while (text[j] != 0)
X	    {
X	    text[j] = text[j+1] ;
X	    j++ ;
X	    }
X	}
X    }
Xreturn ;
X}
X
X

END_OF_FILE
echo shar: NEWLINE appended to \"'examples/xtbl/xtbl.c'\"
if test 7661 -ne `wc -c <'examples/xtbl/xtbl.c'`; then
    echo shar: \"'examples/xtbl/xtbl.c'\" unpacked with wrong size!
fi
# end of 'examples/xtbl/xtbl.c'
fi
if test -f 'src/CuTbl.l' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/CuTbl.l'\"
else
echo shar: Extracting \"'src/CuTbl.l'\" \(6106 characters\)
sed "s/^X//" >'src/CuTbl.l' <<'END_OF_FILE'
X%{
X
X/* *
X * * This code is completely original.  Permission is granted to do with
X * * it as one wishes.  I disclaim any responsibility whatsoever for
X * * any bad things that may happen because of using it.
X * */
X
X#undef input
X#undef unput
X
Xstatic char *ttt ;
X
X%}
X
Xmodifiers	[bBeEfFgGiInNpPtsSTuUvVwWzZ0-9\+\|\-\=\@]*
X
X%START format data final char_find int_find color_find participants_find
X
X%%
X
X if (new_menu_start)
X	{
X	BEGIN 0 ;
X	new_menu_start = False ;
X	}
X
X<INITIAL>\;			/* Semicolon to end options */
X	{
X	BEGIN format ;
X	return ';' ;
X	}
X
X<INITIAL>equal_rows			/* equal rows option */
X	{
X	return EQUAL_ROWS ;
X	}
X
X<INITIAL>aligned_columns	/* aligned_columns option*/
X	{
X	return ALIGNED_COLUMNS ;
X	}
X
X<INITIAL>clip_on_shrink	/* clip_on_shrink option*/
X	{
X	return CLIP_ON_SHRINK ;
X	}
X
X<INITIAL>equal_columns|equal_cols	/* equal columns option */
X	{
X	return EQUAL_COLUMNS ;
X	}
X
X<INITIAL>tab		/* item separator option */
X	{
X	BEGIN char_find ;
X	return STRING_BREAKER ;
X	}
X
X<INITIAL>lnl		/* lexical newline equivalent */
X	{
X	BEGIN char_find ;
X	return LNL_EQUIVALENT ;
X	}
X
X<INITIAL>snl		/* string newline equivalent */
X	{
X	BEGIN char_find ;
X	return SNL_EQUIVALENT ;
X	}
X
X<INITIAL>padding	/* inter,internal_width & inter,internal_height option*/
X	{
X	BEGIN int_find ;
X	return PADDING ;
X	}
X
X<INITIAL>internals	/* internal_width & internal_height option*/
X	{
X	BEGIN int_find ;
X	return INTERNALS ;
X	}
X
X<INITIAL>inters	/* inter_width & inter_height option*/
X	{
X	BEGIN int_find ;
X	return INTERS ;
X	}
X
X<INITIAL>inter_width	/* inter_width option*/
X	{
X	BEGIN int_find ;
X	return INTER_WIDTH ;
X	}
X
X<INITIAL>inter_height	/* inter_height option*/
X	{
X	BEGIN int_find ;
X	return INTER_HEIGHT ;
X	}
X
X<INITIAL>internal_width	/* internal_width option*/
X	{
X	BEGIN int_find ;
X	return INTERNAL_WIDTH ;
X	}
X
X<INITIAL>internal_height	/* internal_height option*/
X	{
X	BEGIN int_find ;
X	return INTERNAL_HEIGHT ;
X	}
X
X<INITIAL>resize_participants	/* resize_participants option*/
X	{
X	BEGIN participants_find ;
X	return RESIZE_PARTICIPANTS ;
X	}
X
X<INITIAL>([tpc]_)?background_color	/* t_background_color option*/
X	{
X	BEGIN color_find ;
X	if (*yytext == 'b')
X	    return BACKGROUND_COLOR ;
X	else
X	if (*yytext == 'c')
X	    return C_BACKGROUND_COLOR ;
X	else
X	    return T_BACKGROUND_COLOR ;
X	}
X
X<INITIAL>([tpc]_)?foreground_color	/* t_foreground_color option*/
X	{
X	BEGIN color_find ;
X	if (*yytext == 'f')
X	    return FOREGROUND_COLOR ;
X	else
X	if (*yytext == 'c')
X	    return C_FOREGROUND_COLOR ;
X	else
X	    return T_FOREGROUND_COLOR ;
X	}
X
X<INITIAL>([tpc]_)?border_color	/* t_border_color option*/
X	{
X	BEGIN color_find ;
X	if (*yytext == 'b')
X	    return BORDER_COLOR ;
X	else
X	if (*yytext == 'c')
X	    return C_BORDER_COLOR ;
X	else
X	    return T_BORDER_COLOR ;
X	}
X
X<INITIAL>([tpc]_)?border_width	/* t_border_width option*/
X	{
X	BEGIN int_find ;
X	if (*yytext == 'b')
X	    return BORDER_WIDTH ;
X	else
X	if (*yytext == 'c')
X	    return C_BORDER_WIDTH ;
X	else
X	    return T_BORDER_WIDTH ;
X	}
X
X<INITIAL>center|expand|box|allbox|doublebox|delim\(..\)|linesize\([0-9]+\) /* */
X	{
X	return IGNORED_OPTION ;
X	/* ignored options */
X	}
X
X<char_find,int_find,color_find,participants_find>[\(\)] /* parentheses */
X	{
X	if (*yytext == ')')
X	    BEGIN 0 ;
X	return yytext[0] ;
X	}
X
X<char_find,int_find,color_find,participants_find>[ \t] /* white space */
X	{
X	}
X
X<char_find>.		/* single character */
X	{
X	yylval.c_val = yytext[0] ;
X	return CHARACTER ;
X	}
X
X<int_find>-?[0-9]+	/* integers */
X	{
X	yylval.i_val = atoi(yytext) ;
X	return INTEGER ;
X	}
X
X<color_find>[A-Za-z][^ \t\)]*	/* string (color, font, etc.) */
X	{
X	XrmValue from, to ;
X
X	from.size = sizeof (String) ;
X	from.addr = (caddr_t) yytext ;
X	XtConvert ((Widget)tw_, XtRString, &from, XtRPixel, &to) ;
X	yylval.i_val = (int)(*((Pixel *)to.addr)) ;
X	return INTEGER ;
X	}
X
X<participants_find>\,		/* ignore commas */
X	{
X	}
X
X<participants_find>inters 		/* resize_participants */
X	{
X	return INTERS ;
X	}
X
X<participants_find>internals 		/* resize_participants */
X	{
X	return INTERNALS ;
X	}
X
X<participants_find>children 		/* resize_participants */
X	{
X	return CHILDREN ;
X	}
X
X<INITIAL>^\.TS			/* table_start (optional) */
X	{
X	return TS ;
X	}
X
X<INITIAL,format>{modifiers}[\_\=aAnN]{modifiers} /* illegal item element */
X    {
X    char *my_text1 = "CuTbl: Illegal lex item (one of _=aAnN) in (%s)\n%s" ;
X    char *my_text2 = "Legal items are (lLrRcCsS^).\n" ;
X    char *etext = XtMalloc (strlen(my_text1) + strlen(my_text2) +
X			    strlen(yytext)) ;
X    sprintf (etext, my_text1, yytext, my_text2) ;
X    XtError (etext) ;
X    }
X
X<INITIAL,format>{modifiers}[lLrRcC]{modifiers} /* legal item element */
X	{
X	Cu_copy_ds (&ttt, yytext) ;
X	yylval.s_val = ttt ;
X	return ITEM_ELEMENT ;
X	}
X
X<INITIAL,format>\.[ \t]*\n		/* Dot to end formats */
X	{
X	BEGIN data ;
X	return DOT_NL ;
X	}
X
X<INITIAL,format>[sS] 			/* horizontal span element */
X	{
X	return HSPAN_ELEMENT ;
X	}
X
X<INITIAL,format>\^ 			/* vertical span element */
X	{
X	return VSPAN_ELEMENT ;
X	}
X
X<INITIAL,format>\\\n			/* continuation */
X	{
X	return CONTINUATION ;
X	}
X
X<INITIAL,format>\.			/* period */
X	{
X	/* Kludge city! I don't know why the code commented out doesn't work */
X	/* Lex fails to recognize the following string when it appears */
X	unput ('\n') ;
X	unput ('.') ;
X	/***
X	BEGIN data ;
X	return '.' ;
X	***/
X	}
X
X<INITIAL,format>\n			/* newline */
X	{
X	return NL ;
X	}
X
X<INITIAL,format>^[-=][ \t]*\n		/* lines ignored */
X    {
X    }
X
X<INITIAL,format>^#.*\n			/* comments	*/
X    {
X    }
X
X<INITIAL,format>[ \t]*			/* white space */
X    {
X    }
X
X<INITIAL,format>.   			/* anything else */
X    {
X    ytblerror ("Lexical error") ;
X    }
X
X<data>^\.T\&			/* table_ampersand */
X	{
X	BEGIN format ;
X	return TAMPERSAND ;
X	}
X
X<data>^[^.].*\n			/* data items */
X	{
X	if (yyleng >=2 && strcmp ("\\\n", &yytext[yyleng-2]) == 0)
X		{
X		yytext[yyleng-2] = '\0' ;
X		yyleng -= 2 ;
X		yymore () ;
X		}
X	else
X		{
X		yytext[yyleng-1] = '\0' ;
X		Cu_copy_ds (&ttt, yytext) ;
X		yylval.s_val = ttt ;
X		if (yyleng > 1)
X		    return STRING ;
X		}
X	}
X
X<data>^\n		/* trailing newlines */
X	{
X	}
X
X^\.TE[ \t\n]*			/* table_end (optional) */
X	{
X	BEGIN final ;
X	return TE ;
X	}
X
X<final>[.\n]				/* ignore all	*/
X    {
X    }
X
X%%
X

END_OF_FILE
echo shar: NEWLINE appended to \"'src/CuTbl.l'\"
if test 6107 -ne `wc -c <'src/CuTbl.l'`; then
    echo shar: \"'src/CuTbl.l'\" unpacked with wrong size!
fi
# end of 'src/CuTbl.l'
fi
if test -f 'src/CuWlmP.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'src/CuWlmP.h'\"
else
echo shar: Extracting \"'src/CuWlmP.h'\" \(7279 characters\)
sed "s/^X//" >'src/CuWlmP.h' <<'END_OF_FILE'
X/* CuWlm widget private definitions */
X
X#ifndef _Cu_WlmP_h
X#define _Cu_WlmP_h
X
X#include <X11/IntrinsicP.h>
X#include <X11/StringDefs.h>
X
X#include <X11/CompositeP.h>	/* Superclass Private Include File	*/
X#include "CuWlm.h"		/* Class Public Include File		*/
X#include "CuProcedureR.h"
X#include "CuBmgrR.h"
X
X#define TAG_CLASS_ENTRY(ww,tag,wclass) \
X	{ \
X	CuWlmTagClassList *save = ww->wlm.tag_class_list ; \
X	ww->wlm.tag_class_list = (CuWlmTagClassList *) \
X				 XtMalloc (sizeof (CuWlmTagClassList)) ; \
X	ww->wlm.tag_class_list->quark = XrmStringToQuark (tag) ; \
X	ww->wlm.tag_class_list->class = wclass ; \
X	ww->wlm.tag_class_list->next = save ; \
X	}
X
X/*
X * Prelude
X */
X
Xtypedef enum {
X	     CuWlmCroakOnNotFound, CuWlmAddOnNotFound, CuWlmNullOnNotFound
X	     } CuWlmNotFoundAction ;
Xtypedef enum {
X	     CuWlmStringArg, CuWlmCharArg, CuWlmFloatArg, CuWlmArgValArg
X	     } CuWlmArgType ;
Xtypedef enum {
X	     CuWlmLocalContext, CuWlmGlobalContext
X	     } CuWlmContext ;
Xtypedef enum {
X	     CuWlmGetIntType, CuWlmGetFloatType, CuWlmGetStringType, CuWlmGetBoolType
X	     } CuWlmGetType ;
Xtypedef enum {
X	     CuWlmRequestNotSatisfied, CuWlmRequestSatisfied
X	     } CuWlmSREstatus ;
Xtypedef enum {
X	     CuWlmInactiveHistory, CuWlmRecordHistory
X	     } CuWlmHistoryMode ;
Xtypedef enum {
X	     CuWlmIndirectQueue,  CuWlmSetFloatQueue, CuWlmSetIntQueue,
X	     CuWlmSetStringQueue, CuWlmGetQueue,      CuWlmScanQueue,
X	     CuWlmSetBoolQueue
X	     } CuWlmQueueType ;
X
Xtypedef enum {
X	     CuWlmResourceInfoClass,  CuWlmResourceInfoRepresentation
X	     } CuWlmResourceInfoType ;
X
Xtypedef struct CuWlmManageItem
X    {
X    String widget ;
X    String type ;
X    String value ;
X    } CuWlmManageItem ;
X
Xtypedef struct CuWlmSreRecord
X    {
X    CuWlmSREstatus status ;
X    struct CuWlmSreRecord *next ;
X    } CuWlmSreRecord ;
X
Xtypedef struct CuWlmQueueRecord
X    {
X    CuWlmQueueType type ;
X    Widget w ;
X    caddr_t client ;
X    caddr_t call ;
X    struct CuWlmQueueRecord *next ;
X    } CuWlmQueueRecord ;
X
Xtypedef struct
X    {
X    String name ;
X    Widget id ;
X    } CuWlmWidgetList ;
X
Xtypedef struct CuWlmTagClassList
X    {
X    XrmQuark quark ;
X    WidgetClass class ;
X    struct CuWlmTagClassList *next ;
X    } CuWlmTagClassList ;
X
X/* TODO: make bigger temps in menu.y,main.c and then allocate and transfer */
X/* or save/null method */
X
X#define MAX_DIRECTIVE_ARGUMENTS 10
X#define MAX_DIRECTIVE_CALLDATA_ITEMS 10
X#define MAX_DIRECTIVE_CALLDATA_INDICES 2
X
Xtypedef union
X    {
X    Widget widget ;
X    String string ;
X    } UValues ;
X
Xtypedef enum
X    {
X     CuWlmDirectiveEquivalence
X    ,CuWlmDirectiveNonEquivalence
X    ,CuWlmDirectiveGreaterThan
X    ,CuWlmDirectiveLessThan
X    ,CuWlmDirectiveGreaterThanOrEqualTo
X    ,CuWlmDirectiveLessThanOrEqualTo
X    } CuWlmDirectiveOperator ;
X
Xtypedef struct CuWlmSampleList
X    {
X    XtProc sample_proc ;
X    Widget id ;
X    struct CuWlmSampleList *next ;
X    } CuWlmSampleList ;
X
Xtypedef struct
X    {
X    XtCallbackProc callback_proc ;
X    caddr_t  client_data ;
X    CuWlmWidget ww ;
X    } CuWlmIndirectRecord ;
X
Xtypedef struct
X    {
X    float *target ;
X    float  value ;
X    CuWlmWidget ww ;
X    CuWlmConnectionType wlm_type ;
X    } CuWlmSetFloatRecord ;
X
Xtypedef struct
X    {
X    Boolean *target ;
X    Boolean  value ;
X    CuWlmWidget ww ;
X    CuWlmConnectionType wlm_type ;
X    } CuWlmSetBoolRecord ;
X
Xtypedef struct
X    {
X    int *target ;
X    int  value ;
X    CuWlmWidget ww ;
X    CuWlmConnectionType wlm_type ;
X    } CuWlmSetIntRecord ;
X
Xtypedef struct
X    {
X    String *target ;
X    String  value ;
X    CuWlmWidget ww ;
X    CuWlmConnectionType wlm_type ;
X    } CuWlmSetStringRecord ;
X
Xtypedef struct
X    {
X    CuWlmGetType type ;
X    caddr_t    target ;
X    CuWlmWidget ww ;
X    CuWlmConnectionType wlm_type ;
X    } CuWlmGetRecord ;
X
Xtypedef struct
X    {
X    String format ;
X    caddr_t t0,  t1,  t2,  t3,  t4,  t5,  t6,  t7,  t8,  t9,
X	    t10, t11, t12, t13, t14, t15, t16, t17, t18, t19 ;
X    CuWlmWidget ww ;
X    CuWlmConnectionType wlm_type ;
X    } CuWlmScanRecord ;
X
Xtypedef struct CuWlmCallbackList
X    {
X    Widget   widget_id ;
X    XrmQuark widget_name_quark ;
X    XrmQuark widget_class_quark ;
X    XrmQuark callback_name_quark ;
X    struct CuWlmCallbackList *next ;
X    } CuWlmCallbackList ;
X
Xtypedef struct Resource
X    {
X    String name ;
X    String class ;
X    String value ;
X    CuWlmContext context ;
X    } Resource ;
X
Xtypedef struct Directive
X    {
X    String callback_name ;
X    String *call_data_converter ;
X    String *call_data ;
X    CuWlmDirectiveOperator *call_data_operator ;
X    int **call_data_index ;
X    int n_call_comparisons ;
X    Cardinal *n_call_indices ;
X    String target_class ;
X    String target_name ;
X    Resource resource ;
X    String procedure ;
X    Cardinal n_arguments ;
X    String *argument_converters ;
X    String *argument_strings ;
X    long client_data[3] ;
X    } Directive ;
X
Xtypedef struct Fetus
X    {
X    WidgetClass class ;
X    XrmQuark class_name ;
X    String widget_name ;
X    Cardinal n_resources ;
X    Resource *resources ;
X    Cardinal n_directives ;
X    Directive *directives ;
X    Cardinal n_children ;
X    struct Fetus *children ;
X    Cardinal n_manage_list ;
X    CuWlmManageItem *manage_list ;
X    Widget id ;
X    } Fetus ;
X
Xtypedef struct CuWlmProcedureList
X    {
X    XrmQuark	         quark ;
X    XtProc	  	 procedure ;
X    struct CuWlmProcedureList *next ;
X    } CuWlmProcedureList ;
X
Xtypedef struct WidgetIdList
X    {
X    Widget	   id ;
X    struct WidgetIdList   *next ;
X    } WidgetIdList ;
X
Xtypedef struct WidgetNameList
X    {
X    XrmQuark	   quark ;
X    WidgetIdList   *widget_id_list ;
X    struct WidgetNameList *next ;
X    } WidgetNameList ;
X
Xtypedef struct WidgetClassList
X    {
X    XrmQuark	    quark ;
X    WidgetNameList  *widget_name_list ;
X    CuWlmProcedureList	 *proc_list ;
X    struct WidgetClassList *next ;
X    } WidgetClassList ;
X
X/*
X * The new fields added to superclass widget structure
X */
X
Xtypedef struct _CuWlmPart
X    {
X    /* resources */
X    String layout_file ;    /* horizontal space surrounding children*/
X    XtCallbackList expose_callbacks;
X
X    /* private state */
X    XrmQuark conversion_class ;
X    Cardinal cur_depth ;
X    Cardinal max_depth ;
X    XrmQuark *quarks_list ;
X    XrmBinding *bindings_list ;
X    XrmDatabase *database ;
X    CuWlmTagClassList *tag_class_list ;
X    CuWlmProcedureList *proc_list ;
X    CuWlmSampleList *sample_list ;
X    WidgetClassList *widget_class_list ;
X    CuWlmSreRecord *sre_status ;
X    CuWlmQueueRecord *queue_ptr ;
X    CuWlmQueueRecord *history_ptr ;
X    CuWlmHistoryMode history_mode ;
X    Boolean sampling_active ;
X    Boolean first_device ;
X    Fetus *child ;
X    long event_stamp ;
X    } CuWlmPart ;
X
X/*
X * The complete widget instance structure for this widget
X */
X
Xtypedef struct _CuWlmRec
X    {
X    CorePart		core ;
X    CompositePart	composite ;
X    CuWlmPart		wlm ;
X    } CuWlmRec ;
X
Xtypedef struct
X    {
X    int not_used ;
X    } CuWlmClassPart ;
X
X/*
X * The complete widget class structure for the widget
X */
X
Xtypedef struct _CuWlmClassRec
X    {
X    CoreClassPart	core_class ;
X    CompositeClassPart	composite_class ;
X    CuWlmClassPart	wlm_class ;
X    } CuWlmClassRec ;
X
X/*
X * The name of a "constant" of the generic widget class structure
X */
X
Xextern CuWlmClassRec cuWlmClassRec ;
X
X#endif _Cu_WlmP_h

END_OF_FILE
echo shar: NEWLINE appended to \"'src/CuWlmP.h'\"
if test 7280 -ne `wc -c <'src/CuWlmP.h'`; then
    echo shar: \"'src/CuWlmP.h'\" unpacked with wrong size!
fi
# end of 'src/CuWlmP.h'
fi
if test -f 'wlmCompiler/wlc.y' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'wlmCompiler/wlc.y'\"
else
echo shar: Extracting \"'wlmCompiler/wlc.y'\" \(8907 characters\)
sed "s/^X//" >'wlmCompiler/wlc.y' <<'END_OF_FILE'
X%{
X/* global declaractions */
X
XStack *fetus_stack ;
XStack *incl_stack ;
X
Xstatic Directive *directive ;
Xstatic Resource *resource ;
X
Xextern int yacc_bug ;
X
Xstatic char *resource_unify () ;
Xstatic char *perm_string = "String" ;
X
X%}
X
X%start	init
X
X%union	{
X	float	f_val ;
X	int	i_val ;
X	char	*s_val ;
X	char	c_val ;
X	WlmDirectiveOperator op_val ;
X	}
X
X%type <op_val>	test_operator
X%type <s_val>	resource_word
X%token <s_val>	WORD
X%token <s_val>	STRING
X%token		IF_KEY
X%token		SET_VALUES_KEY
X%token		MANAGE_KEY
X%token		INCL_KEY
X%token 		ERROR
X
X%%
X
Xinit		:
X    {
X    Cu_stack_create ("Fetus", &fetus_stack, 100) ;
X    Cu_stack_create ("Child", &ww->child_stack, 100) ;
X    Cu_stack_create ("Include", &incl_stack, 10) ;
X    ww->cur_depth = 0 ;
X    ww->max_depth = 0 ;
X    }
X		| init widget_equivalent
X		;
X
Xwidget_equivalent : widget
X		  | inclusion
X		  ;
X
Xinclusion	:	INCL_KEY STRING
X	{
X	Cu_stack_push (incl_stack, (int) layout_input) ;
X	layout_input = (WlmInputRecord *)XtCalloc(1, sizeof (WlmInputRecord)) ;
X	read_layout ($2, layout_input) ;
X	}
X		;
X
Xwidget		: widget_header '{' widget_body '}'
X    {
X    Fetus *fetus ;
X    Fetus *parent ;
X    /*
X     * pop off fetus stack,
X     * pop children (if any) from child_stack
X     * push the widget to child stack
X     */
X    fetus = (Fetus *) Cu_stack_pop (fetus_stack) ;
X    parent = (Fetus *) Cu_stack_peek (fetus_stack, STACK_NEXT_POP) ;
X    if (parent)
X	{
X	parent->n_children++ ;
X	}
X    if (fetus->n_children)
X	{
X	Cardinal i ;
X
X	fetus->children = (Fetus **)
X			  XtMalloc (fetus->n_children * sizeof (Fetus *)) ;
X	for (i=0;  i < fetus->n_children;  i++)
X	    {
X	    fetus->children[i] = (Fetus *) Cu_stack_pop (ww->child_stack) ;
X	    }
X	}
X    Cu_stack_push (ww->child_stack, (int) fetus) ;
X    ww->cur_depth-- ;
X    }
X		;
X
Xwidget_header	: WORD
X    {
X    /* allocate and push onto fetus stack */
X    Fetus *fetus = (Fetus *) XtMalloc (sizeof (Fetus)) ;
X    fetus->class_name = $1 ;
X    fetus->n_directives = 0 ;
X    fetus->directives = NULL ;
X    fetus->n_children = 0 ;
X    fetus->n_resources = 0 ;
X    fetus->resource = NULL ;
X    fetus->n_manage_list = 0 ;
X    fetus->manage_list = NULL ;
X    Cu_stack_push (fetus_stack, (int) fetus) ;
X    ww->cur_depth++ ;
X    if (ww->cur_depth > ww->max_depth)
X	ww->max_depth = ww->cur_depth ;
X    }
X		;
X
Xwidget_body	: widget_element
X		| widget_body widget_element
X		;
X
Xwidget_element	: directive
X    {
X    Fetus *fetus = (Fetus *) Cu_stack_peek (fetus_stack, STACK_NEXT_POP) ;
X    Directive *save = fetus->directives ;
X    fetus->directives = directive ;
X    directive->next = save ;
X    fetus->n_directives++ ;
X    }
X		| widget_resource
X		| manage_resource
X		| global_resource
X		| widget_equivalent
X		;
X
Xglobal_resource	: '*' resource_word STRING
X    {
X    Fetus *fetus = (Fetus *) Cu_stack_peek (fetus_stack, STACK_NEXT_POP) ;
X    Resource *save = fetus->resource ;
X    fetus->resource = (Resource *) XtMalloc (sizeof(Resource)) ;
X    fetus->resource->name = resource_unify ($2) ;
X    fetus->resource->value = $3 ;
X    fetus->resource->context = WlmGlobalContext ;
X    fetus->resource->next = save ;
X    fetus->n_resources++ ;
X    }
X		;
X
Xresource_word : WORD
X    {
X    }
X	      | WORD '*' resource_word
X    {
X    $$ = XtMalloc (strlen($1) + strlen($3) + 2) ;
X    sprintf ($$, "%s*%s", $1, $3) ;
X    }
X	      ;
X
Xwidget_resource	: WORD STRING
X    {
X    Fetus *fetus = (Fetus *) Cu_stack_peek (fetus_stack, STACK_NEXT_POP) ;
X    Resource *save = fetus->resource ;
X    fetus->resource = (Resource *) XtMalloc (sizeof(Resource)) ;
X    fetus->resource->name = resource_unify ($1) ;
X    fetus->resource->value = $2 ;
X    fetus->resource->context = WlmLocalContext ;
X    fetus->resource->next = save ;
X    fetus->n_resources++ ;
X    }
X		;
X
Xmanage_resource : MANAGE_KEY manage_args
X		;
X
Xmanage_args	: manage_arg
X		| manage_args maybe_comma manage_arg
X		;
X
Xmanage_arg	: STRING ':' WORD STRING
X    {
X    /* For now, presume that "Button" is the only valid class */
X    Fetus *fetus = (Fetus *) Cu_stack_peek (fetus_stack, STACK_NEXT_POP) ;
X    WlmManageItem *save = fetus->manage_list ;
X    fetus->manage_list = (WlmManageItem *) XtMalloc (sizeof(WlmManageItem)) ;
X    fetus->manage_list->widget = $1 ;
X    fetus->manage_list->type = $3 ;
X    fetus->manage_list->value = $4 ;
X    fetus->manage_list->next = save ;
X    fetus->n_manage_list++ ;
X    }
X		| STRING
X    {
X    Fetus *fetus = (Fetus *) Cu_stack_peek (fetus_stack, STACK_NEXT_POP) ;
X    WlmManageItem *save = fetus->manage_list ;
X    fetus->manage_list = (WlmManageItem *) XtMalloc (sizeof(WlmManageItem)) ;
X    fetus->manage_list->widget = $1 ;
X    fetus->manage_list->type = perm_string ;
X    fetus->manage_list->value = $1 ;
X    fetus->manage_list->next = save ;
X    fetus->n_manage_list++ ;
X    }
X		;
X
Xdirective : directive_head callback_name '(' test_group ')' r_target_info
X	  | directive_head callback_name '(' test_group ')' f_target_info
X	  ;
X
Xdirective_head	: IF_KEY
X    {
X    /* Make sure that everything is zeroed */
X    directive = (Directive *) XtCalloc (1, sizeof(Directive)) ;
X    directive->n_call_comparisons = 0 ;
X    }
X		;
X
Xcallback_name	: WORD
X    {
X    directive->callback_name = $1 ;
X    }
X		;
X
Xtest_group	:
X		| test_series
X		;
X
Xtest_series	: test_pair
X		| test_series test_conjunction test_pair
X		;
X
Xtest_pair	: WORD STRING test_operator WORD test_indices
X    {
X    directive->call_data_converter[directive->n_call_comparisons] = $1 ;
X    directive->call_data[directive->n_call_comparisons] = $2 ;
X    directive->call_data_operator[directive->n_call_comparisons] = $3 ;
X    directive->n_call_comparisons++ ;
X    }
X		| WORD test_indices test_operator WORD STRING
X    {
X    directive->call_data_converter[directive->n_call_comparisons] = $4 ;
X    directive->call_data[directive->n_call_comparisons] = $5 ;
X    directive->call_data_operator[directive->n_call_comparisons] = $3 ;
X    directive->n_call_comparisons++ ;
X    }
X		;
X
Xr_target_info	: SET_VALUES_KEY '(' r_target_args ')'
X		;
X
Xr_target_args	: target_class target_name ',' resource_name maybe_comma  resource_value
X		;
X
Xf_target_info	: procedure_name '(' f_target_args ')'
X		;
X
Xf_target_args	: target_class target_name target_args
X		;
X
Xmaybe_comma	:
X		| ','
X		;
X
Xtarget_class	: WORD
X    {
X    directive->target_class = $1 ;
X    }
X
Xtarget_name	: STRING
X    {
X    directive->target_name = $1 ;
X    }
X
Xresource_name	: WORD
X    {
X    directive->resource.name = resource_unify ($1) ;
X    }
X
Xprocedure_name	: WORD
X    {
X    directive->procedure = $1 ;
X    directive->n_arguments = 0 ;
X    }
X
Xresource_value	: STRING
X    {
X    directive->resource.value = $1 ;
X    }
X
Xtarget_args	: 
X	 	| ',' argument_list
X		;
X
Xargument_list	: argument
X		| argument_list ',' argument
X		;
X
Xargument	: WORD STRING
X    {
X    directive->argument_converters[directive->n_arguments] = $1 ;
X    directive->argument_strings[directive->n_arguments] = $2 ;
X    directive->n_arguments++ ;
X    }
X		;
X
Xtest_conjunction : '&' '&'
X		 ;
X
Xtest_operator	: '=' '='
X    {
X    $$ = WlmDirectiveEquivalence ;
X    directive->n_call_indices[directive->n_call_comparisons] = 0 ;
X    }
X		| '!' '='
X    {
X    $$ = WlmDirectiveNonEquivalence ;
X    directive->n_call_indices[directive->n_call_comparisons] = 0 ;
X    }
X		| '>' 
X    {
X    $$ = WlmDirectiveGreaterThan ;
X    directive->n_call_indices[directive->n_call_comparisons] = 0 ;
X    }
X		| '<'
X    {
X    $$ = WlmDirectiveLessThan ;
X    directive->n_call_indices[directive->n_call_comparisons] = 0 ;
X    }
X		| '>' '='
X    {
X    $$ = WlmDirectiveGreaterThanOrEqualTo ;
X    directive->n_call_indices[directive->n_call_comparisons] = 0 ;
X    }
X		| '<' '='
X    {
X    $$ = WlmDirectiveLessThanOrEqualTo ;
X    directive->n_call_indices[directive->n_call_comparisons] = 0 ;
X    }
X		;
X
Xtest_indices	:
X		| index_series
X		;
X
Xindex_series	: test_index
X		| index_series test_index
X		;
X
Xtest_index	: '[' WORD ']'
X    {
X    directive->call_data_index[directive->n_call_comparisons]
X			      [directive->n_call_indices[directive->n_call_comparisons]] = atoi($2) ;
X    directive->n_call_indices[directive->n_call_comparisons]++ ;
X    }
X		;
X
X%%
X
X/*
X * -v => y.output
X * -d => y.tab.h
X * -l => no #lines (for -g (cc))
X *
X * left recursion is better (as in init above)
X */
X
X#include <ctype.h>
X
Xstatic char *
Xresource_unify (string)
X    char *string ;
X{
X/* replace occurrences of "_x" with "X" */
Xint length = strlen (string) ;
XCardinal i, j ;
XCardinal start =0 ;
X
Xif (strncmp (string, "XtN", 3) == 0)
X    start = 3 ;
X
Xfor (i=start;  i < length-1;  i++)
X    {
X    if (string[i] == '_' && islower(string[i+1]))
X	{
X	string[i] = toupper(string[i+1]) ;
X	for (j=i+1;  j < length-1;  j++)
X	    string[j] = string[j+1] ;
X	string[j] = '\0' ;
X	}
X    }
X
Xreturn &string[start] ;
X}
X
Xstatic int
Xyywrap ()
X{
XXtFree (layout_input->input_buffer) ;
XXtFree (layout_input) ;
X
Xif (Cu_stack_size (incl_stack) == 0)
X    {
X    return 1 ;
X    }
X
Xlayout_input = (WlmInputRecord *) Cu_stack_pop (incl_stack) ;
Xreturn 0 ;
X}
X
X#include "wlc.lex.c"

END_OF_FILE
echo shar: NEWLINE appended to \"'wlmCompiler/wlc.y'\"
if test 8908 -ne `wc -c <'wlmCompiler/wlc.y'`; then
    echo shar: \"'wlmCompiler/wlc.y'\" unpacked with wrong size!
fi
# end of 'wlmCompiler/wlc.y'
fi
echo shar: End of archive 9 \(of 12\).
cp /dev/null ark9isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 12 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0