diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-06-07 18:57:14 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-06-07 18:57:14 (GMT) |
commit | 4fc3cdba34e1f5656fd0ecd62dbd10d3f608a399 (patch) | |
tree | 8aca19febd6de529d6ec366eee60ee229277a927 /ds9/parsers | |
parent | 0f031457dc54364fd58dcecc3c635e5b5c727c73 (diff) | |
download | blt-4fc3cdba34e1f5656fd0ecd62dbd10d3f608a399.zip blt-4fc3cdba34e1f5656fd0ecd62dbd10d3f608a399.tar.gz blt-4fc3cdba34e1f5656fd0ecd62dbd10d3f608a399.tar.bz2 |
add ds9 crosshair send parser
Diffstat (limited to 'ds9/parsers')
-rw-r--r-- | ds9/parsers/crosshairsendlex.fcl | 16 | ||||
-rw-r--r-- | ds9/parsers/crosshairsendparser.tac | 34 | ||||
-rw-r--r-- | ds9/parsers/pansendparser.tac | 2 |
3 files changed, 51 insertions, 1 deletions
diff --git a/ds9/parsers/crosshairsendlex.fcl b/ds9/parsers/crosshairsendlex.fcl new file mode 100644 index 0000000..0fa3d47 --- /dev/null +++ b/ds9/parsers/crosshairsendlex.fcl @@ -0,0 +1,16 @@ +#tab crosshairsendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +lock {return $LOCK_} + +#include coords.fin +#include string.fin + +%% + diff --git a/ds9/parsers/crosshairsendparser.tac b/ds9/parsers/crosshairsendparser.tac new file mode 100644 index 0000000..32db6ca --- /dev/null +++ b/ds9/parsers/crosshairsendparser.tac @@ -0,0 +1,34 @@ +%{ +%} + +#include coords.tin +#include string.tin + +%start crosshairsend + +%token LOCK_ + +%% + +#include coords.trl + +crosshairsend : {ProcessSendCmdCurrent frame "get crosshair physical fk5 degrees"} + | coordsys {ProcessSendCmdCurrent frame "get crosshair $1 fk5 degrees"} + | wcssys {ProcessSendCmdCurrent frame "get crosshair $1 fk5 degrees"} + | skyframe {ProcessSendCmdCurrent frame "get crosshair wcs $1 degrees"} + | wcssys skyframe {ProcessSendCmdCurrent frame "get crosshair $1 $2 degrees"} + | wcssys skyformat {ProcessSendCmdCurrent frame "get crosshair $1 fk5 $2"} + | skyframe skyformat {ProcessSendCmdCurrent frame "get crosshair wcs $1 $2"} + | wcssys skyframe skyformat {ProcessSendCmdCurrent frame "get crosshair $1 $2 $3"} + | LOCK_ {ProcessSendCmdGet crosshair lock} + ; + +%% + +proc crosshairsend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} diff --git a/ds9/parsers/pansendparser.tac b/ds9/parsers/pansendparser.tac index 806104d..2fa0d5f 100644 --- a/ds9/parsers/pansendparser.tac +++ b/ds9/parsers/pansendparser.tac @@ -10,7 +10,7 @@ #include coords.trl -pansend : {ProcessSendCmdCurrent frame "get cursor image fk5 degrees"} +pansend : {ProcessSendCmdCurrent frame "get cursor physical fk5 degrees"} | coordsys {ProcessSendCmdCurrent frame "get cursor $1 fk5 degrees"} | wcssys {ProcessSendCmdCurrent frame "get cursor $1 fk5 degrees"} | skyframe {ProcessSendCmdCurrent frame "get cursor wcs $1 degrees"} |