summaryrefslogtreecommitdiffstats
path: root/ds9/parsers
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-11 16:33:22 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-11 16:33:22 (GMT)
commit9a7fedd488a60e755afeffc1fa60c560f2492446 (patch)
treefef3282767bf69ab1285f817fcc7c8134fa06e92 /ds9/parsers
parent82c78868be2567fc0399379497288892fc6d0506 (diff)
downloadblt-9a7fedd488a60e755afeffc1fa60c560f2492446.zip
blt-9a7fedd488a60e755afeffc1fa60c560f2492446.tar.gz
blt-9a7fedd488a60e755afeffc1fa60c560f2492446.tar.bz2
add ds9 wcs send parser
Diffstat (limited to 'ds9/parsers')
-rw-r--r--ds9/parsers/wcssendlex.fcl17
-rw-r--r--ds9/parsers/wcssendparser.tac28
2 files changed, 45 insertions, 0 deletions
diff --git a/ds9/parsers/wcssendlex.fcl b/ds9/parsers/wcssendlex.fcl
new file mode 100644
index 0000000..411535d
--- /dev/null
+++ b/ds9/parsers/wcssendlex.fcl
@@ -0,0 +1,17 @@
+#tab wcssendparser.tab.tcl
+
+%{
+%}
+
+#include defs.fin
+
+%%
+
+align {return $ALIGN_}
+sky {return $SKY_}
+skyformat {return $SKYFORMAT_}
+system {return $SYSTEM_}
+
+#include ws.fin
+
+%%
diff --git a/ds9/parsers/wcssendparser.tac b/ds9/parsers/wcssendparser.tac
new file mode 100644
index 0000000..f8db331
--- /dev/null
+++ b/ds9/parsers/wcssendparser.tac
@@ -0,0 +1,28 @@
+%{
+%}
+
+%start wcssend
+
+%token ALIGN_
+%token SKY_
+%token SKYFORMAT_
+%token SYSTEM_
+
+%%
+
+wcssend : {ProcessSendCmdGet wcs system}
+ | ALIGN_ {ProcessSendCmdYesNo current align}
+ | SYSTEM_ {ProcessSendCmdGet wcs system}
+ | SKY_ {ProcessSendCmdGet wcs sky}
+ | SKYFORMAT_ {ProcessSendCmdGet wcs skyformat}
+ ;
+
+%%
+
+proc wcssend::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}