package provide DS9 1.0 ###### # Begin autogenerated taccle (version 1.3) routines. # Although taccle itself is protected by the GNU Public License (GPL) # all user-supplied functions are protected by their respective # author's license. See http://mini.net/tcl/taccle for other details. ###### namespace eval dsseso { variable yylval {} variable table variable rules variable token {} variable yycnt 0 variable yyerr 0 variable save_state 0 namespace export yylex } proc dsseso::YYABORT {} { return -code return 1 } proc dsseso::YYACCEPT {} { return -code return 0 } proc dsseso::YYERROR {} { variable yyerr set yyerr 1 } proc dsseso::yyclearin {} { variable token variable yycnt set token {} incr yycnt -1 } proc dsseso::yyerror {s} { puts stderr $s } proc dsseso::setupvalues {stack pointer numsyms} { upvar 1 1 y set y {} for {set i 1} {$i <= $numsyms} {incr i} { upvar 1 $i y set y [lindex $stack $pointer] incr pointer } } proc dsseso::unsetupvalues {numsyms} { for {set i 1} {$i <= $numsyms} {incr i} { upvar 1 $i y unset y } } array set dsseso::table { 10:280,target 40 9:284 shift 16:283,target 22 30:283 reduce 29:283 reduce 9:285 shift 9:286 shift 27:0 reduce 9:287 shift 48:0 reduce 3:267,target 19 51:283,target 38 7:283,target 1 38:283 reduce 0:275,target 9 11:282,target 19 40:283,target 10 39:283,target 33 6:266 shift 7:262,target 32 9:299 goto 56:0,target 30 6:268 shift 24:0 reduce 48:0,target 9 47:283 reduce 41:0,target 8 45:0 reduce 33:0,target 31 2:282,target 12 28:283,target 5 0:294,target 14 17:280 shift 25:0,target 39 34:282,target 12 0:273,target 7 56:283 reduce 7:259,target 29 7:260,target 30 21:0 reduce 9:287,target 38 26:283 reduce 52:283,target 37 2:280,target 17 12:282,target 20 41:283,target 8 35:283 reduce 0:271,target 5 11:277,target 19 44:276 shift 7:257,target 27 6:298 goto 3:267 shift 38:0 reduce 30:283,target 6 29:283,target 3 9:285,target 36 45:277,target 54 3:270 shift 44:283 reduce 43:290,target 51 8:281,target 11 14:281 shift 14:282 shift 53:0,target 16 44:289 goto 0:268,target 3 45:0,target 12 53:283 reduce 37:0,target 43 30:0,target 6 29:0,target 3 22:0,target 28 53:283,target 16 35:0 reduce 4:263,target 22 23:283 reduce 56:0 reduce 14:294 goto 42:283,target 50 12:277,target 20 18:281,target 11 3:292 goto 32:283 reduce 11:0 reduce 41:276 shift 31:283,target 4 2:294,target 18 0:264 shift 32:0 reduce 0:265 shift 44:289,target 52 53:0 reduce 0:268 shift 34:294,target 45 0:269 shift 11:276 reduce 41:283 reduce 0:271 shift 11:277 reduce 19:283,target 15 20:283,target 14 0:272 shift 11:278 reduce 0:273 shift 0:274 shift 11:281 reduce 0:275 shift 11:282 reduce 41:276,target 48 0:264,target 1 41:289 goto 9:299,target 39 54:283,target 17 49:283 reduce 0:280 shift 7:0,target 1 28:0 reduce 0:281 shift 0:0,target 24 0:282 shift 14:282,target 12 50:0 reduce 49:0 reduce 0:283 shift 57:0,target 13 43:283,target 10 19:283 reduce 20:283 reduce 50:0,target 23 49:0,target 35 0:283,target 13 8:281 shift 26:0,target 34 8:282 shift 32:283,target 7 11:0,target 19 0:294 goto 25:0 reduce 28:283 reduce 0:295 goto 46:0 reduce 0:297 goto 21:283,target 32 7:288,target 33 0:281,target 11 37:283 reduce 8:294 goto 0:0 reduce 55:283,target 18 3:292,target 21 22:0 reduce 46:283 reduce 43:0 reduce 44:283,target 8 1:283,target 26 16:283 reduce 33:283,target 31 55:283 reduce 5:283 reduce 54:0,target 17 40:0 reduce 39:0 reduce 22:283,target 28 25:283 reduce 46:0,target 11 0:297,target 16 38:0,target 44 31:0,target 4 16:296 goto 23:0,target 29 15:0,target 0 34:281 shift 56:283,target 30 34:282 shift 15:0 accept 14:294,target 41 45:283,target 12 43:279 shift 36:0 reduce 0:295,target 15 57:0 reduce 43:283 reduce 6:298,target 26 34:294 goto 0:274,target 8 11:281,target 19 13:283 reduce 43:290 goto 7:261,target 31 12:0 reduce 52:283 reduce 2:280 shift 2:281 shift 23:283,target 29 33:0 reduce 2:282 shift 2:281,target 11 54:0 reduce 22:283 reduce 44:276,target 48 57:283,target 13 1:0,target 26 34:281,target 11 0:272,target 6 11:278,target 19 7:0 reduce 51:0,target 38 40:279,target 46 31:283 reduce 2:294 goto 7:258,target 28 46:283,target 11 43:0,target 10 35:0,target 41 30:0 reduce 29:0 reduce 9:286,target 37 27:0,target 2 45:278,target 55 7:257 shift 19:0,target 15 20:0,target 14 51:0 reduce 40:279 shift 7:258 shift 12:0,target 20 7:259 shift 7:260 shift 8:282,target 12 35:283,target 41 7:261 shift 40:283 reduce 39:283 reduce 7:262 shift 12:281,target 20 10:280 shift 16:296,target 42 0:269,target 4 11:276,target 19 17:280,target 43 24:283,target 40 40:290 goto 26:0 reduce 48:283 reduce 9:284,target 35 47:0 reduce 45:276,target 53 13:283,target 27 18:281 shift 18:282 shift 12:278,target 20 18:282,target 12 57:283 reduce 1:0 reduce 47:283,target 36 4:283,target 23 7:283 reduce 23:0 reduce 27:283 reduce 44:0 reduce 5:0,target 25 18:294 goto 36:283,target 42 7:288 goto 55:0,target 18 12:276,target 20 47:0,target 36 36:283 reduce 40:0,target 10 39:0,target 33 4:263 shift 25:283,target 39 45:276 shift 32:0,target 7 0:265,target 2 45:277 shift 6:268,target 25 24:0,target 40 45:278 shift 45:293,target 57 16:0,target 21 19:0 reduce 20:0 reduce 41:0 reduce 45:283 reduce 48:283,target 9 45:291 goto 5:283,target 25 54:283 reduce 45:293 goto 6:266,target 24 16:0 reduce 45:291,target 56 4:283 shift 37:283,target 43 37:0 reduce 8:294,target 34 14:281,target 11 24:283 reduce 0:282,target 12 26:283,target 34 40:290,target 47 33:283 reduce 13:0 reduce 55:0 reduce 52:0,target 37 12:276 reduce 44:0,target 8 42:283 shift 12:277 reduce 18:294,target 44 43:279,target 46 36:0,target 42 12:278 reduce 49:283,target 35 0:280,target 10 28:0,target 5 12:281 reduce 21:0,target 32 12:282 reduce 13:0,target 27 51:283 reduce 38:283,target 44 31:0 reduce 1:283 reduce 52:0 reduce 3:270,target 20 21:283 reduce 27:283,target 2 41:289,target 49 5:0 reduce } array set dsseso::rules { 9,l 289 11,l 290 32,l 297 6,l 288 28,l 297 3,l 288 25,l 297 0,l 300 22,l 296 43,l 299 18,l 293 40,l 298 39,l 298 15,l 292 36,l 297 12,l 291 33,l 297 7,l 288 29,l 297 30,l 297 4,l 288 26,l 297 1,l 288 23,l 295 44,l 299 19,l 294 20,l 294 41,l 299 16,l 293 37,l 297 13,l 291 34,l 297 8,l 289 10,l 290 31,l 297 5,l 288 27,l 297 2,l 288 24,l 297 21,l 295 42,l 299 17,l 293 38,l 297 14,l 292 35,l 297 } array set dsseso::rules { 12,dc 0 26,dc 1 3,dc 1 41,dc 1 18,dc 1 33,dc 2 9,dc 1 11,dc 1 25,dc 1 2,dc 1 40,dc 1 39,dc 1 17,dc 1 32,dc 2 8,dc 0 10,dc 0 24,dc 0 1,dc 0 38,dc 4 16,dc 1 31,dc 2 7,dc 1 23,dc 3 0,dc 1 37,dc 4 15,dc 1 29,dc 2 30,dc 4 6,dc 1 44,dc 1 22,dc 0 36,dc 3 14,dc 1 28,dc 2 5,dc 1 43,dc 1 21,dc 1 35,dc 3 13,dc 1 27,dc 1 4,dc 1 42,dc 1 19,dc 1 20,dc 1 34,dc 2 } array set dsseso::rules { 41,line 152 7,line 93 37,line 144 4,line 90 34,line 140 1,line 87 31,line 136 27,line 131 24,line 128 21,line 124 17,line 117 22,e 1 14,line 112 11,line 105 43,line 154 9,line 101 40,line 149 39,line 148 6,line 92 36,line 143 3,line 89 33,line 138 29,line 133 30,line 135 26,line 130 23,line 125 19,line 120 20,line 121 16,line 116 13,line 109 10,line 104 42,line 153 8,line 100 38,line 145 5,line 91 35,line 141 2,line 88 32,line 137 28,line 132 25,line 129 22,line 124 18,line 118 15,line 113 12,line 108 44,line 155 } array set dsseso::lr1_table { 35 {{41 {0 283} 1}} 14,trans {{281 41} {282 42} {294 43}} 36 {{42 {0 283} 1}} 33,trans {} 37 {{43 {0 283} 1}} 52,trans {} 38 {{44 {0 283} 1}} 40 {{36 {0 283} 2} {10 {0 283} 0} {11 {0 283} 0}} 39 {{33 {0 283} 2}} 18,trans {{281 41} {282 42} {294 46}} 41 {{19 {0 276} 1}} 1,trans {} 37,trans {} 42 {{20 {0 276} 1}} 56,trans {} 43 {{35 {0 283} 2} {8 {0 283} 0} {9 {0 283} 0}} 44 {{23 0 2}} 23,trans {} 45 {{38 {0 283} 3} {10 {0 283} 0} {11 {0 283} 0}} 5,trans {} 42,trans {} 46 {{37 {0 283} 3} {8 {0 283} 0} {9 {0 283} 0}} 61,trans {} 47 {{19 {0 276 277 278} 1}} 48 {{20 {0 276 277 278} 1}} 50 {{11 {0 283} 1}} 49 {{30 {0 283} 3} {12 {0 283} 0} {13 {0 283} 0} {16 {0 283} 0} {17 {0 283} 0} {18 {0 283} 0}} 27,trans {} 9,trans {{284 35} {285 36} {286 37} {287 38} {299 39}} 46,trans {{276 52} {289 56}} 51 {{36 {0 283} 3}} 52 {{9 {0 283} 1}} 53 {{35 {0 283} 3}} 13,trans {} 54 {{23 0 3}} 32,trans {} 51,trans {} 55 {{38 {0 283} 4}} 56 {{37 {0 283} 4}} 57 {{16 {0 283} 1}} 17,trans {{280 45}} 0,trans {{264 1} {265 2} {268 3} {269 4} {271 5} {272 6} {273 7} {274 8} {275 9} {280 10} {281 11} {282 12} {283 13} {294 14} {295 15} {297 16}} 58 {{17 {0 283} 1}} 36,trans {} 55,trans {} 60 {{30 {0 283} 4}} 59 {{18 {0 283} 1}} 61 {{13 {0 283} 1}} 22,trans {} 4,trans {{263 22} {283 23}} 41,trans {} 60,trans {} 59,trans {} 26,trans {} 8,trans {{281 11} {282 12} {294 34}} 45,trans {{279 50} {290 55}} 12,trans {} 31,trans {} 50,trans {} 49,trans {{276 57} {277 58} {278 59} {291 60} {293 61}} 16,trans {{296 44}} 35,trans {} 54,trans {} 21,trans {} 3,trans {{267 19} {270 20} {292 21}} 40,trans {{279 50} {290 51}} 39,trans {} 58,trans {} 10 {{36 {0 283} 1}} 11 {{19 {281 282} 1}} 25,trans {} 12 {{20 {281 282} 1}} 7,trans {{257 27} {258 28} {259 29} {260 30} {261 31} {262 32} {288 33}} 44,trans {{283 54}} 13 {{27 {0 283} 1}} 14 {{35 {0 283} 1} {19 {0 276} 0} {20 {0 276} 0}} 11,trans {} 15 {{0 0 1}} 30,trans {} 29,trans {} 16 {{21 0 1} {23 0 1} {22 283 0}} 48,trans {} 0 {{0 0 0} {21 0 0} {23 0 0} {24 {0 283} 0} {25 {0 283} 0} {26 {0 283} 0} {27 {0 283} 0} {28 {0 283} 0} {29 {0 283} 0} {30 {0 283} 0} {31 {0 283} 0} {32 {0 283} 0} {33 {0 283} 0} {34 {0 283} 0} {35 {0 283} 0} {36 {0 283} 0} {37 {0 283} 0} {38 {0 283} 0} {19 {281 282} 0} {20 {281 282} 0}} 17 {{38 {0 283} 2}} 1 {{26 {0 283} 1}} 18 {{37 {0 283} 2} {19 {0 276} 0} {20 {0 276} 0}} 15,trans {} 2 {{37 {0 283} 1} {38 {0 283} 1} {19 {281 282} 0} {20 {281 282} 0}} 19 {{15 {0 283} 1}} 20 {{14 {0 283} 1}} 34,trans {{281 47} {282 48} {294 49}} 3 {{32 {0 283} 1} {14 {0 283} 0} {15 {0 283} 0}} 21 {{32 {0 283} 2}} 53,trans {} 4 {{28 {0 283} 1} {29 {0 283} 1}} 22 {{28 {0 283} 2}} 5 {{25 {0 283} 1}} 23 {{29 {0 283} 2}} 20,trans {} 19,trans {} 6 {{34 {0 283} 1} {39 {0 283} 0} {40 {0 283} 0}} 2,trans {{280 17} {281 11} {282 12} {294 18}} 24 {{40 {0 283} 1}} 38,trans {} 7 {{31 {0 283} 1} {1 {0 283} 0} {2 {0 283} 0} {3 {0 283} 0} {4 {0 283} 0} {5 {0 283} 0} {6 {0 283} 0} {7 {0 283} 0}} 25 {{39 {0 283} 1}} 57,trans {} 8 {{30 {0 283} 1} {19 {281 282} 0} {20 {281 282} 0}} 26 {{34 {0 283} 2}} 9 {{33 {0 283} 1} {41 {0 283} 0} {42 {0 283} 0} {43 {0 283} 0} {44 {0 283} 0}} 27 {{2 {0 283} 1}} 24,trans {} 6,trans {{266 24} {268 25} {298 26}} 28 {{5 {0 283} 1}} 43,trans {{276 52} {289 53}} 29 {{3 {0 283} 1}} 30 {{6 {0 283} 1}} 31 {{4 {0 283} 1}} 10,trans {{280 40}} 32 {{7 {0 283} 1}} 28,trans {} 33 {{31 {0 283} 2}} 47,trans {} 34 {{30 {0 283} 2} {19 {0 276 277 278} 0} {20 {0 276 277 278} 0}} } array set dsseso::token_id_table { 286,t 0 286 DSS2BLUE_ 280,title SEXSTR 279,title SEXAGESIMAL 264,line 15 298,title {} 292,line 111 287 DSS2INFRARED_ 270,t 0 269,t 0 288 yesno 300 start' 290 sex 289 deg 276,line 28 265,title COORD 291,t 1 291 sizeOpt 284,title DSS1 292 frame 274,t 0 261,line 11 293 rformat 288,line 86 257,t 0 294 numeric 270,title NEW 269,title NAME 295,t 1 295 command 288,title {} 273,line 24 296 @PSEUDO1 278,t 0 297 dsseso 257,line 7 262,t 0 298 update 285,line 44 274,title SIZE 299,t 1 299 survey 293,title {} 283,t 0 270,line 21 269,line 20 297,line 127 259,title ON 260,title OFF 266,t 0 278,title ARCSEC 297,title {} 282,line 37 287,t 0 error error 271,t 0 264,title CLOSE 266,line 17 294,line 119 283,title string 292,t 1 278,line 30 error,line 85 275,t 0 268,title FRAME 287,title DSS2INFRARED 258,t 0 263,line 14 291,line 107 error,title {} 296,t 1 280,t 0 279,t 0 275,line 26 273,title SAVE 292,title {} 263,t 0 259,line 9 260,line 10 287,line 46 258,title NO 284,t 0 277,title ARCMIN 296,title {} 272,line 23 267,t 0 299,line 151 263,title CLEAR 288,t 1 284,line 43 282,title float 272,t 0 268,line 19 296,line 124 267,title CURRENT 293,t 1 286,title DSS2BLUE 257 YES_ 281,line 36 276,t 0 258 NO_ 259,t 0 259 ON_ 260 OFF_ 260,t 0 272,title UPDATE 261 TRUE_ 265,line 16 297,t 1 293,line 115 291,title {} 262 FALSE_ 281,t 0 263 CLEAR_ 277,line 29 257,title YES 264 CLOSE_ 264,t 0 276,title DEGREES 265 COORD_ 295,title {} 262,line 12 266 CROSSHAIR_ 300,line 156 290,line 103 289,line 99 285,t 0 267 CURRENT_ 0,t 0 0 {$} 262,title FALSE 268 FRAME_ 268,t 0 281,title integer 274,line 25 270 NEW_ 269 NAME_ 299,title {} error,t 0 271 OPEN_ 300,t 1 290,t 1 289,t 1 272 UPDATE_ 258,line 8 286,line 45 273,t 0 273 SAVE_ 266,title CROSSHAIR 285,title DSS2RED 274 SIZE_ 275 SURVEY_ 271,line 22 298,line 147 294,t 1 276 DEGREES_ 277,t 0 277 ARCMIN_ 271,title OPEN 300,title {} 290,title {} 289,title {} 283,line 39 278 ARCSEC_ 261,t 0 280 SEXSTR_ 279 SEXAGESIMAL_ 298,t 1 281 INT_ 267,line 18 295,line 123 282,t 0 282 REAL_ 275,title SURVEY 294,title {} 283 STRING_ 265,t 0 284 DSS1_ 280,line 34 279,line 32 285 DSS2RED_ 261,title TRUE } proc dsseso::yyparse {} { variable yylval variable table variable rules variable token variable yycnt variable lr1_table variable token_id_table variable yyerr variable save_state set yycnt 0 set state_stack {0} set value_stack {{}} set token "" set accepted 0 set yyerr 0 set save_state 0 while {$accepted == 0} { set state [lindex $state_stack end] if {$token == ""} { set yylval "" set token [yylex] set buflval $yylval if {$token>0} { incr yycnt } } if {![info exists table($state:$token)] || $yyerr} { if {!$yyerr} { set save_state $state } # pop off states until error token accepted while {[llength $state_stack] > 0 && \ ![info exists table($state:error)]} { set state_stack [lrange $state_stack 0 end-1] set value_stack [lrange $value_stack 0 \ [expr {[llength $state_stack] - 1}]] set state [lindex $state_stack end] } if {[llength $state_stack] == 0} { set rr { } if {[info exists lr1_table($save_state,trans)] && [llength $lr1_table($save_state,trans)] >= 1} { foreach trans $lr1_table($save_state,trans) { foreach {tok_id nextstate} $trans { set ss $token_id_table($tok_id,title) if {$ss != {}} { append rr "$ss, " } } } } set rr [string trimleft $rr { }] set rr [string trimright $rr {, }] yyerror "parse error, expecting: $rr" return 1 } lappend state_stack [set state $table($state:error,target)] lappend value_stack {} # consume tokens until it finds an acceptable one while {![info exists table($state:$token)]} { if {$token == 0} { yyerror "end of file while recovering from error" return 1 } set yylval {} set token [yylex] set buflval $yylval } continue } switch -- $table($state:$token) { shift { lappend state_stack $table($state:$token,target) lappend value_stack $buflval set token "" } reduce { set rule $table($state:$token,target) set ll $rules($rule,l) if {[info exists rules($rule,e)]} { set dc $rules($rule,e) } else { set dc $rules($rule,dc) } set stackpointer [expr {[llength $state_stack]-$dc}] setupvalues $value_stack $stackpointer $dc set _ $1 set yylval [lindex $value_stack end] switch -- $rule { 1 { set _ 1 } 2 { set _ 1 } 3 { set _ 1 } 4 { set _ 1 } 5 { set _ 0 } 6 { set _ 0 } 7 { set _ 0 } 8 { set _ degrees } 9 { set _ degrees } 10 { set _ sexagesimal } 11 { set _ sexagesimal } 12 { set _ degrees } 13 { set _ $1 } 14 { set _ new } 15 { set _ current } 16 { set _ degrees } 17 { set _ arcmin } 18 { set _ arcsec } 19 { set _ $1 } 20 { set _ $1 } 22 { global ds9; if {!$ds9(init)} {YYERROR} else {yyclearin; YYACCEPT} } 24 { IMGSVRApply deso 1 } 26 { ARDestroy deso } 27 { ProcessCmdSet deso name $1 "IMGSVRApply deso 1" } 28 { ProcessCmdSet deso name {} } 29 { ProcessCmdSet deso name $2 "IMGSVRApply deso 1" } 30 { ProcessCmdSet4 deso width $2 height $3 rformat $4 rformat,msg $4 } 31 { ProcessCmdSet deso save $2 } 32 { ProcessCmdSet deso mode $2 } 33 { ProcessCmdSet deso survey $2 } 35 { ProcessCmdSet4 deso x $1 y $2 skyformat $3 skyformat,msg $3 "IMGSVRApply deso 1" } 36 { ProcessCmdSet4 deso x $1 y $2 skyformat $3 skyformat,msg $3 "IMGSVRApply deso 1" } 37 { ProcessCmdSet4 deso x $2 y $3 skyformat $4 skyformat,msg $4 "IMGSVRApply deso 1" } 38 { ProcessCmdSet4 deso x $2 y $3 skyformat $4 skyformat,msg $4 "IMGSVRApply deso 1" } 39 { IMGSVRUpdate deso; IMGSVRApply deso 1 } 40 { IMGSVRCrosshair deso; IMGSVRApply deso 1 } 41 { set _ DSS1 } 42 { set _ DSS2-red } 43 { set _ DSS2-blue } 44 { set _ DSS2-infrared } } unsetupvalues $dc # pop off tokens from the stack if normal rule if {![info exists rules($rule,e)]} { incr stackpointer -1 set state_stack [lrange $state_stack 0 $stackpointer] set value_stack [lrange $value_stack 0 $stackpointer] } # now do the goto transition lappend state_stack $table([lindex $state_stack end]:$ll,target) lappend value_stack $_ } accept { set accepted 1 } goto - default { puts stderr "Internal parser error: illegal command $table($state:$token)" return 2 } } } return 0 } ###### # end autogenerated taccle functions ###### proc dsseso::yyerror {msg} { variable yycnt variable yy_current_buffer variable index_ ParserError $msg $yycnt $yy_current_buffer $index_ }