diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-11 17:09:54 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-11 17:09:54 (GMT) |
commit | 92fc6a10347cc38b62c621728ed33aa267dcc75b (patch) | |
tree | 6ac59b5cf01d562cf2290505cc5fc9104c852a89 /ds9/library | |
parent | 44b298577ac9f07ec6560fe0a1f6bbd37f8bd250 (diff) | |
download | blt-92fc6a10347cc38b62c621728ed33aa267dcc75b.zip blt-92fc6a10347cc38b62c621728ed33aa267dcc75b.tar.gz blt-92fc6a10347cc38b62c621728ed33aa267dcc75b.tar.bz2 |
add ds9 mosaicwcs/mosiciraf parsers
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/mosaiciraf.tcl | 35 | ||||
-rw-r--r-- | ds9/library/mosaicwcs.tcl | 35 | ||||
-rw-r--r-- | ds9/library/source.tcl | 4 |
3 files changed, 68 insertions, 6 deletions
diff --git a/ds9/library/mosaiciraf.tcl b/ds9/library/mosaiciraf.tcl index be91595..c2a3656 100644 --- a/ds9/library/mosaiciraf.tcl +++ b/ds9/library/mosaiciraf.tcl @@ -47,11 +47,19 @@ proc ProcessMosaicIRAFCmd {varname iname sock fn} { upvar $varname var upvar $iname i - global loadParam - global current + global debug + if {$debug(tcl,parser)} { + global parse + set parse(sock) $sock + set parse(fn) $fn - set layer {} + mosaiciraf::YY_FLUSH_BUFFER + mosaiciraf::yy_scan_string [lrange $var $i end] + mosaiciraf::yyparse + incr i [expr $mosaiciraf::yycnt-1] + } else { + set layer {} switch -- [string tolower [lindex $var $i]] { new { incr i @@ -84,3 +92,24 @@ proc ProcessMosaicIRAFCmd {varname iname sock fn} { } FinishLoad } +} + +proc MosaicIRAFCmdLoad {param layer} { + global parse + + if {$parse(sock) != {}} { + # xpa + if {![LoadMosaicIRAFSocket $parse(sock) $param $layer]} { + InitError xpa + LoadMosaicIRAFFile $param $layer + } + } else { + # comm + if {$parse(fn) != {}} { + LoadMosaicIRAFAlloc $parse(fn) $param $layer + } else { + LoadMosaicIRAFFile $param $layer + } + } + FinishLoad +} diff --git a/ds9/library/mosaicwcs.tcl b/ds9/library/mosaicwcs.tcl index 3e4b604..65e16b0 100644 --- a/ds9/library/mosaicwcs.tcl +++ b/ds9/library/mosaicwcs.tcl @@ -83,11 +83,19 @@ proc ProcessMosaicWCSCmd {varname iname sock fn} { upvar $varname var upvar $iname i - global loadParam - global current + global debug + if {$debug(tcl,parser)} { + global parse + set parse(sock) $sock + set parse(fn) $fn + + mosaicwcs::YY_FLUSH_BUFFER + mosaicwcs::yy_scan_string [lrange $var $i end] + mosaicwcs::yyparse + incr i [expr $mosaicwcs::yycnt-1] + } else { set layer {} - switch -- [string tolower [lindex $var $i]] { new { incr i @@ -127,6 +135,27 @@ proc ProcessMosaicWCSCmd {varname iname sock fn} { } FinishLoad } +} + +proc MosaicWCSCmdLoad {param layer sys} { + global parse + + if {$parse(sock) != {}} { + # xpa + if {![LoadMosaicWCSSocket $parse(sock) $param $layer $sys]} { + InitError xpa + LoadMosaicWCSFile $param $layer $sys + } + } else { + # comm + if {$parse(fn) != {}} { + LoadMosaicWCSAlloc $parse(fn) $param $layer $sys + } else { + LoadMosaicWCSFile $param $layer $sys + } + } + FinishLoad +} proc ProcessSendMosaicWCSCmd {proc id param sock fn} { global current diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl index a24b714..e750ddb 100644 --- a/ds9/library/source.tcl +++ b/ds9/library/source.tcl @@ -256,6 +256,10 @@ source $ds9(root)/library/minmaxparser.tcl source $ds9(root)/library/minmaxlex.tcl source $ds9(root)/library/modeparser.tcl source $ds9(root)/library/modelex.tcl +source $ds9(root)/library/mosaicwcsparser.tcl +source $ds9(root)/library/mosaicwcslex.tcl +source $ds9(root)/library/mosaicirafparser.tcl +source $ds9(root)/library/mosaiciraflex.tcl source $ds9(root)/library/mosaicimageirafparser.tcl source $ds9(root)/library/mosaicimageiraflex.tcl source $ds9(root)/library/mosaicimagewcsparser.tcl |