From 3379de35277197a1e5b31e508a68dcf523afebac Mon Sep 17 00:00:00 2001 From: William Joye Date: Tue, 5 Jun 2018 15:03:23 -0400 Subject: add ds9 pan send parser --- ds9/parsers/pansendlex.fcl | 14 ++++++++++++++ ds9/parsers/pansendparser.tac | 31 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 ds9/parsers/pansendlex.fcl create mode 100644 ds9/parsers/pansendparser.tac 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_ +} -- cgit v0.12