diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-06-05 19:03:23 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-06-05 19:03:23 (GMT) |
commit | 3379de35277197a1e5b31e508a68dcf523afebac (patch) | |
tree | e450bd62a6c791d1d6052d3d8e0e84c6dbcb577f | |
parent | 44b1f9f425e4c7708ad086ff066c3cd92eed5af8 (diff) | |
download | blt-3379de35277197a1e5b31e508a68dcf523afebac.zip blt-3379de35277197a1e5b31e508a68dcf523afebac.tar.gz blt-3379de35277197a1e5b31e508a68dcf523afebac.tar.bz2 |
add ds9 pan send parser
-rw-r--r-- | ds9/parsers/pansendlex.fcl | 14 | ||||
-rw-r--r-- | ds9/parsers/pansendparser.tac | 31 |
2 files changed, 45 insertions, 0 deletions
diff --git a/ds9/parsers/pansendlex.fcl b/ds9/parsers/pansendlex.fcl new file mode 100644 index 0000000..1531358 --- /dev/null +++ b/ds9/parsers/pansendlex.fcl @@ -0,0 +1,14 @@ +#tab pansendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +#include coords.fin +#include string.fin + +%% + diff --git a/ds9/parsers/pansendparser.tac b/ds9/parsers/pansendparser.tac new file mode 100644 index 0000000..d9d4481 --- /dev/null +++ b/ds9/parsers/pansendparser.tac @@ -0,0 +1,31 @@ +%{ +%} + +#include coords.tin +#include string.tin + +%start pansend + +%% + +#include coords.trl + +pansend : {ProcessSendCmdCurrent "get cursor image fk5 degrees"} + | coordsys {ProcessSendCmdCurrent "get cursor $1 fk5 degrees"} + | wcssys {ProcessSendCmdCurrent "get cursor $1 fk5 degrees"} + | skyframe {ProcessSendCmdCurrent "get cursor wcs $1 degrees"} + | wcssys skyframe {ProcessSendCmdCurrent "get cursor $1 $2 degrees"} + | wcssys skyformat {ProcessSendCmdCurrent "get cursor $1 fk5 $2"} + | skyframe skyformat {ProcessSendCmdCurrent "get cursor wcs $1 $2"} + | wcssys skyframe skyformat {ProcessSendCmdCurrent "get cursor $1 $2 $3"} + ; + +%% + +proc pansend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |