From e4c8461f20f9c2981d8393854ed1a661e97b6f1f Mon Sep 17 00:00:00 2001 From: William Joye Date: Wed, 6 Jun 2018 16:45:25 -0400 Subject: update ds9 parsers --- ds9/library/skyview.tcl | 9 ++++++++- ds9/library/source.tcl | 2 ++ ds9/parsers/skyviewlex.fcl | 12 ------------ ds9/parsers/skyviewsendlex.fcl | 15 +++++++++++++++ ds9/parsers/skyviewsendparser.tac | 31 +++++++++++++++++++++++++++++++ 5 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 ds9/parsers/skyviewsendlex.fcl create mode 100644 ds9/parsers/skyviewsendparser.tac diff --git a/ds9/library/skyview.tcl b/ds9/library/skyview.tcl index ad8e3ba..0e0a3f5 100644 --- a/ds9/library/skyview.tcl +++ b/ds9/library/skyview.tcl @@ -618,5 +618,12 @@ proc ProcessSkyViewCmd {varname iname} { proc ProcessSendSkyViewCmd {proc id param {sock {}} {fn {}}} { SkyViewDialog - IMGSVRProcessSendCmd $proc $id $param dskyview + + global parse + set parse(proc) $proc + set parse(id) $id + + skyviewsend::YY_FLUSH_BUFFER + skyviewsend::yy_scan_string $param + skyviewsend::yyparse } diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl index 8b175bd..92e40a7 100644 --- a/ds9/library/source.tcl +++ b/ds9/library/source.tcl @@ -358,6 +358,8 @@ source $ds9(root)/library/siaparser.tcl source $ds9(root)/library/sialex.tcl source $ds9(root)/library/skyviewparser.tcl source $ds9(root)/library/skyviewlex.tcl +source $ds9(root)/library/skyviewsendparser.tcl +source $ds9(root)/library/skyviewsendlex.tcl source $ds9(root)/library/sleepparser.tcl source $ds9(root)/library/sleeplex.tcl source $ds9(root)/library/smoothparser.tcl diff --git a/ds9/parsers/skyviewlex.fcl b/ds9/parsers/skyviewlex.fcl index 415463f..873cec7 100644 --- a/ds9/parsers/skyviewlex.fcl +++ b/ds9/parsers/skyviewlex.fcl @@ -7,19 +7,7 @@ %% -close {return $CLOSE_} -coord {return $COORD_} -crosshair {return $CROSSHAIR_} -current {return $CURRENT_} -frame {return $FRAME_} -name {return $NAME_} -new {return $NEW_} -open {return $OPEN_} pixels {return $PIXELS_} -save {return $SAVE_} -size {return $SIZE_} -survey {return $SURVEY_} -update {return $UPDATE_} #include yesno.fin #include imgsvr.fin diff --git a/ds9/parsers/skyviewsendlex.fcl b/ds9/parsers/skyviewsendlex.fcl new file mode 100644 index 0000000..4c063fd --- /dev/null +++ b/ds9/parsers/skyviewsendlex.fcl @@ -0,0 +1,15 @@ +#tab skyviewsendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +pixels {return $PIXELS_} + +#include imgsvr.fin +#include string.fin + +%% diff --git a/ds9/parsers/skyviewsendparser.tac b/ds9/parsers/skyviewsendparser.tac new file mode 100644 index 0000000..c53feae --- /dev/null +++ b/ds9/parsers/skyviewsendparser.tac @@ -0,0 +1,31 @@ +%{ +%} + +#include imgsvr.tin +#include string.tin + +%start skyviewsend + +%token PIXELS_ + +%% + +skyviewsend : {ProcessSendCmdGet dskyview name} + | NAME_ {ProcessSendCmdGet dskyview name} + | SAVE_ {ProcessSendCmdYesNo dskyview save} + | FRAME_ {ProcessSendCmdGet dskyview mode} + | SURVEY_ {ProcessSendCmdGet dskyview survey} + | SIZE_ {ProcessSendCmdGet3 dskyview width height rformat} + | PIXELS_ {ProcessSendCmdGet2 dskyview width,pixels height,pixels} + | COORD_ {ProcessSendCmdGet3 dskyview x y skyformat} + ; + +%% + +proc skyviewsend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} -- cgit v0.12