diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-09 18:44:05 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-09 18:44:05 (GMT) |
commit | 888c5a7dc8199ffdf42f5e58b26fa4863195f0e9 (patch) | |
tree | cb1e8e7a5c12fb40737d2308d68dfb33b4690e76 /ds9/library | |
parent | 564e1f08a369740a5b081c0c29d88459c9ae1002 (diff) | |
download | blt-888c5a7dc8199ffdf42f5e58b26fa4863195f0e9.zip blt-888c5a7dc8199ffdf42f5e58b26fa4863195f0e9.tar.gz blt-888c5a7dc8199ffdf42f5e58b26fa4863195f0e9.tar.bz2 |
add ds9 envi parser
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/envi.tcl | 41 | ||||
-rw-r--r-- | ds9/library/source.tcl | 2 |
2 files changed, 15 insertions, 28 deletions
diff --git a/ds9/library/envi.tcl b/ds9/library/envi.tcl index c03d496..43459b6 100644 --- a/ds9/library/envi.tcl +++ b/ds9/library/envi.tcl @@ -35,10 +35,13 @@ proc ProcessENVICmd {varname iname sock fn} { upvar $varname var upvar $iname i - global loadParam - global current - - set layer {} + global debug + if {$debug(tcl,parser)} { + envi::YY_FLUSH_BUFFER + envi::yy_scan_string [lrange $var $i end] + envi::yyparse + incr i [expr $envi::yycnt-1] + } else { switch -- [string tolower [lindex $var $i]] { new { @@ -55,33 +58,15 @@ proc ProcessENVICmd {varname iname sock fn} { } } - if {$sock != {}} { - # xpa - if {0} { - # not supported - } else { - set fn [lindex $var $i] - set fn2 [lindex $var [expr $i+1]] - if {$fn2 == {}} { - set fn2 [FindENVIDataFile $fn] - } - ImportENVIFile $fn $fn2 - } - } else { - # comm - if {0} { - # not supported - } else { - set fn [lindex $var $i] - set fn2 [lindex $var [expr $i+1]] - if {$fn2 == {}} { - set fn2 [FindENVIDataFile $fn] - } - ImportENVIFile $fn $fn2 - } + set fn [lindex $var $i] + set fn2 [lindex $var [expr $i+1]] + if {$fn2 == {}} { + set fn2 [FindENVIDataFile $fn] } + ImportENVIFile $fn $fn2 FinishLoad } +} proc FindENVIDataFile {fn} { set rn [file rootname $fn] diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl index 1f1204f..e6ed274 100644 --- a/ds9/library/source.tcl +++ b/ds9/library/source.tcl @@ -226,6 +226,8 @@ source $ds9(root)/library/dsssaoparser.tcl source $ds9(root)/library/dsssaolex.tcl source $ds9(root)/library/dssstsciparser.tcl source $ds9(root)/library/dssstscilex.tcl +source $ds9(root)/library/enviparser.tcl +source $ds9(root)/library/envilex.tcl source $ds9(root)/library/exportparser.tcl source $ds9(root)/library/exportlex.tcl source $ds9(root)/library/frameparser.tcl |