From 2a954e3b3b7fa383a1f4ccd3c0f97118097a1e19 Mon Sep 17 00:00:00 2001 From: William Joye Date: Wed, 6 Jun 2018 11:43:08 -0400 Subject: add ds9 dsssao send parser --- ds9/library/2mass.tcl | 3 --- ds9/library/sao.tcl | 16 ++++++++++------ ds9/library/source.tcl | 2 ++ ds9/parsers/dsssaosendlex.fcl | 13 +++++++++++++ ds9/parsers/dsssaosendparser.tac | 28 ++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 ds9/parsers/dsssaosendlex.fcl create mode 100644 ds9/parsers/dsssaosendparser.tac diff --git a/ds9/library/2mass.tcl b/ds9/library/2mass.tcl index e8697ac..48f1233 100644 --- a/ds9/library/2mass.tcl +++ b/ds9/library/2mass.tcl @@ -41,9 +41,6 @@ proc 2MASSDialog {} { set var(rformat) $twomass(rformat) set var(width) $twomass(width) set var(height) $twomass(height) - # not used - set var(width,pixels) 300 - set var(height,pixels) 300 set var(mode) $twomass(mode) set var(save) $twomass(save) set var(survey) $twomass(survey) diff --git a/ds9/library/sao.tcl b/ds9/library/sao.tcl index 6a62f26..60a507a 100644 --- a/ds9/library/sao.tcl +++ b/ds9/library/sao.tcl @@ -17,7 +17,6 @@ proc SAODef {} { set sao(height) 15 set sao(mode) new set sao(save) 0 - set sao(survey) dss } proc SAODialog {} { @@ -41,12 +40,8 @@ proc SAODialog {} { set var(rformat) $sao(rformat) set var(width) $sao(width) set var(height) $sao(height) - # not used - set var(width,pixels) 300 - set var(height,pixels) 300 set var(mode) $sao(mode) set var(save) $sao(save) - set var(survey) $sao(survey) set w $var(top) IMGSVRInit $varname "SAO-DSS [msgcat::mc {Server}]" \ @@ -157,6 +152,15 @@ proc ProcessSAOCmd {varname iname} { proc ProcessSendSAOCmd {proc id param {sock {}} {fn {}}} { SAODialog - IMGSVRProcessSendCmd $proc $id $param dsao + + global parse + set parse(proc) $proc + set parse(id) $id + + dsssaosend::YY_FLUSH_BUFFER + dsssaosend::yy_scan_string $param + dsssaosend::yyparse + +# IMGSVRProcessSendCmd $proc $id $param dsao } diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl index 6d7c950..7cca79c 100644 --- a/ds9/library/source.tcl +++ b/ds9/library/source.tcl @@ -234,6 +234,8 @@ source $ds9(root)/library/dssesoparser.tcl source $ds9(root)/library/dssesolex.tcl source $ds9(root)/library/dsssaoparser.tcl source $ds9(root)/library/dsssaolex.tcl +source $ds9(root)/library/dsssaosendparser.tcl +source $ds9(root)/library/dsssaosendlex.tcl source $ds9(root)/library/dssstsciparser.tcl source $ds9(root)/library/dssstscilex.tcl source $ds9(root)/library/enviparser.tcl diff --git a/ds9/parsers/dsssaosendlex.fcl b/ds9/parsers/dsssaosendlex.fcl new file mode 100644 index 0000000..5569902 --- /dev/null +++ b/ds9/parsers/dsssaosendlex.fcl @@ -0,0 +1,13 @@ +#tab dsssaosendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +#include imgsvr.fin +#include string.fin + +%% diff --git a/ds9/parsers/dsssaosendparser.tac b/ds9/parsers/dsssaosendparser.tac new file mode 100644 index 0000000..10eb6a6 --- /dev/null +++ b/ds9/parsers/dsssaosendparser.tac @@ -0,0 +1,28 @@ +%{ +%} + +#include imgsvr.tin +#include string.tin + +%start dsssaosend + +%% + +dsssaosend : {ProcessSendCmdGet dsao name} + | NAME_ {ProcessSendCmdGet dsao name} + | SAVE_ {ProcessSendCmdYesNo dsao save} + | FRAME_ {ProcessSendCmdGet dsao mode} + | SURVEY_ {ProcessSendCmdGet dsao survey} + | SIZE_ {ProcessSendCmdGet3 dsao width height rformat} + | COORD_ {ProcessSendCmdGet3 dsao x y skyformat} + ; + +%% + +proc dsssaosend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} -- cgit v0.12