summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-18 21:07:10 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-18 21:07:10 (GMT)
commitc0c8abfa6b311ad0632245c235dad5196ce78c31 (patch)
treebbb50c21ddc56e102f54d97d0b0ee0a0a3ba5e6e /ds9/library
parentea1b537c632e38d9daa857f33ba85f184f66a61a (diff)
downloadblt-c0c8abfa6b311ad0632245c235dad5196ce78c31.zip
blt-c0c8abfa6b311ad0632245c235dad5196ce78c31.tar.gz
blt-c0c8abfa6b311ad0632245c235dad5196ce78c31.tar.bz2
add ds9 nres send parser
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/nameres.tcl29
-rw-r--r--ds9/library/source.tcl2
2 files changed, 16 insertions, 15 deletions
diff --git a/ds9/library/nameres.tcl b/ds9/library/nameres.tcl
index 5c5c2c6..2040539 100644
--- a/ds9/library/nameres.tcl
+++ b/ds9/library/nameres.tcl
@@ -193,23 +193,22 @@ proc ProcessNRESCmd {varname iname} {
}
proc ProcessSendNRESCmd {proc id param {sock {}} {fn {}}} {
- global nres
- global pnres
- global dnres
+ global parse
+ set parse(proc) $proc
+ set parse(id) $id
NRESDialog
- switch -- [string tolower [lindex $param 0]] {
- server {$proc $id "$pnres(server)\n"}
- format -
- skyformat {$proc $id "$dnres(skyformat)\n"}
- name -
- {} {$proc $id "$dnres(name)\n"}
- default {
- set dnres(name) [lindex $param 0]
- NRESApply dnres 1
- $proc $id "$dnres(x) $dnres(y)\n"
- }
- }
+ nressend::YY_FLUSH_BUFFER
+ nressend::yy_scan_string $param
+ nressend::yyparse
}
+proc NRESSendCmd {name} {
+ global parse
+ global dnres
+
+ set dnres(name) $name
+ NRESApply dnres 1
+ $parse(proc) $parse(id) "$dnres(x) $dnres(y)\n"
+}
diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl
index 2a16199..ffee7f2 100644
--- a/ds9/library/source.tcl
+++ b/ds9/library/source.tcl
@@ -314,6 +314,8 @@ source $ds9(root)/library/nanparser.tcl
source $ds9(root)/library/nanlex.tcl
source $ds9(root)/library/nresparser.tcl
source $ds9(root)/library/nreslex.tcl
+source $ds9(root)/library/nressendparser.tcl
+source $ds9(root)/library/nressendlex.tcl
source $ds9(root)/library/nrrdparser.tcl
source $ds9(root)/library/nrrdlex.tcl
source $ds9(root)/library/nvssparser.tcl