summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-18 21:08:00 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-18 21:08:00 (GMT)
commit1c1aa7532515c455508065839b03c3da2011f885 (patch)
treeb0f901a3c1110fe3d42a252e35e2d3832220fa21
parentc0c8abfa6b311ad0632245c235dad5196ce78c31 (diff)
downloadblt-1c1aa7532515c455508065839b03c3da2011f885.zip
blt-1c1aa7532515c455508065839b03c3da2011f885.tar.gz
blt-1c1aa7532515c455508065839b03c3da2011f885.tar.bz2
add ds9 nres send parser
-rw-r--r--ds9/parsers/nressendlex.fcl17
-rw-r--r--ds9/parsers/nressendparser.tac29
2 files changed, 46 insertions, 0 deletions
diff --git a/ds9/parsers/nressendlex.fcl b/ds9/parsers/nressendlex.fcl
new file mode 100644
index 0000000..7730c0e
--- /dev/null
+++ b/ds9/parsers/nressendlex.fcl
@@ -0,0 +1,17 @@
+#tab nressendparser.tab.tcl
+
+%{
+%}
+
+#include defs.fin
+
+%%
+
+name {return $NAME_}
+server {return $SERVER_}
+skyformat {return $SKYFORMAT_}
+
+#include string.fin
+#include ws.fin
+
+%%
diff --git a/ds9/parsers/nressendparser.tac b/ds9/parsers/nressendparser.tac
new file mode 100644
index 0000000..7bc6f4b
--- /dev/null
+++ b/ds9/parsers/nressendparser.tac
@@ -0,0 +1,29 @@
+%{
+%}
+
+#include string.tin
+
+%start nressend
+
+%token NAME_
+%token SERVER_
+%token SKYFORMAT_
+
+%%
+
+nressend : {ProcessSendCmdGet dnres name}
+ | NAME_ {ProcessSendCmdGet dnres name}
+ | SERVER_ {ProcessSendCmdGet pnres server}
+ | SKYFORMAT_ {ProcessSendCmdGet dnres skyformat}
+ | STRING_ {NRESSendCmd $1}
+ ;
+
+%%
+
+proc nressend::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}