diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-09 19:50:03 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-09 19:50:03 (GMT) |
commit | 64ff2c1f3dbbf15e0c89feeced72ba783a780df4 (patch) | |
tree | b16cee7d4543df15585a021ffba998524664c9b6 /ds9/library | |
parent | 5273df633cc312db28f2778b05dac48cbe3ae455 (diff) | |
download | blt-64ff2c1f3dbbf15e0c89feeced72ba783a780df4.zip blt-64ff2c1f3dbbf15e0c89feeced72ba783a780df4.tar.gz blt-64ff2c1f3dbbf15e0c89feeced72ba783a780df4.tar.bz2 |
add ds9 mecube parser
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/mecube.tcl | 33 | ||||
-rw-r--r-- | ds9/library/source.tcl | 2 |
2 files changed, 35 insertions, 0 deletions
diff --git a/ds9/library/mecube.tcl b/ds9/library/mecube.tcl index 4523239..3c08660 100644 --- a/ds9/library/mecube.tcl +++ b/ds9/library/mecube.tcl @@ -81,6 +81,18 @@ proc ProcessMECubeCmd {varname iname sock fn} { upvar $varname var upvar $iname i + global debug + if {$debug(tcl,parser)} { + global mecube + set mecube(load,sock) $sock + set mecube(load,fn) $fn + + mecube::YY_FLUSH_BUFFER + mecube::yy_scan_string [lrange $var $i end] + mecube::yyparse + incr i [expr $mecube::yycnt-1] + } else { + switch -- [string tolower [lindex $var $i]] { new { incr i @@ -113,6 +125,27 @@ proc ProcessMECubeCmd {varname iname sock fn} { } FinishLoad } +} + +proc MECubeCmdLoad {param} { + global mecube + + if {$mecube(load,sock) != {}} { + # xpa + if {![LoadMECubeSocket $mecube(load,sock) $param]} { + InitError xpa + LoadMECubeFile $param + } + } else { + # comm + if {$mecube(load,fn) != {}} { + LoadMECubeAlloc $mecube(load,fn) $param + } else { + LoadMECubeFile $param + } + } + FinishLoad +} proc ProcessSendMECubeCmd {proc id param sock fn} { global current diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl index 24364f2..91624db 100644 --- a/ds9/library/source.tcl +++ b/ds9/library/source.tcl @@ -250,6 +250,8 @@ source $ds9(root)/library/maskparser.tcl source $ds9(root)/library/masklex.tcl source $ds9(root)/library/matchparser.tcl source $ds9(root)/library/matchlex.tcl +source $ds9(root)/library/mecubeparser.tcl +source $ds9(root)/library/mecubelex.tcl source $ds9(root)/library/minmaxparser.tcl source $ds9(root)/library/minmaxlex.tcl source $ds9(root)/library/modeparser.tcl |