summaryrefslogtreecommitdiffstats
path: root/ds9/parsers
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-19 15:57:20 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-19 15:57:20 (GMT)
commit39a20376dc46c9d2212b4e87d3e9711d7405dab7 (patch)
tree371ece0533a7a6778fd8039e27e731c7e8bb2b8f /ds9/parsers
parent1c1aa7532515c455508065839b03c3da2011f885 (diff)
downloadblt-39a20376dc46c9d2212b4e87d3e9711d7405dab7.zip
blt-39a20376dc46c9d2212b4e87d3e9711d7405dab7.tar.gz
blt-39a20376dc46c9d2212b4e87d3e9711d7405dab7.tar.bz2
add ds9 vo send parser
Diffstat (limited to 'ds9/parsers')
-rw-r--r--ds9/parsers/vosendlex.fcl18
-rw-r--r--ds9/parsers/vosendparser.tac30
2 files changed, 48 insertions, 0 deletions
diff --git a/ds9/parsers/vosendlex.fcl b/ds9/parsers/vosendlex.fcl
new file mode 100644
index 0000000..22ed2e6
--- /dev/null
+++ b/ds9/parsers/vosendlex.fcl
@@ -0,0 +1,18 @@
+#tab vosendparser.tab.tcl
+
+%{
+%}
+
+#include defs.fin
+
+%%
+
+connect {return $CONNECT_}
+delay {return $DELAY_}
+internal {return $INTERNAL_}
+method {return $METHOD_}
+server {return $SERVER_}
+
+#include ws.fin
+
+%%
diff --git a/ds9/parsers/vosendparser.tac b/ds9/parsers/vosendparser.tac
new file mode 100644
index 0000000..065f8e5
--- /dev/null
+++ b/ds9/parsers/vosendparser.tac
@@ -0,0 +1,30 @@
+%{
+%}
+
+%start vosend
+
+%token CONNECT_
+%token DELAY_
+%token INTERNAL_
+%token METHOD_
+%token SERVER_
+
+%%
+
+vosend : {VOSendCmdConnect 1}
+ | METHOD_ {ProcessSendCmdGet pvo method}
+ | SERVER_ {ProcessSendCmdGet pvo server}
+ | INTERNAL_ {ProcessSendCmdYesNo pvo hv}
+ | DELAY_ {ProcessSendCmdGet pvo delay}
+ | CONNECT_ {VOSendCmdConnect}
+ ;
+
+%%
+
+proc vosend::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}