summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/voparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-04-11 21:41:31 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-04-11 21:41:31 (GMT)
commit4ae99e055b8b3f55884206154283adfdae60ba3a (patch)
tree6e267ddcd3bb38126d2f71b07c9128a2a4ce33df /ds9/parsers/voparser.tac
parent1fcc04b2f17d703e7be022ffa37a14ce2ebc3cc6 (diff)
downloadblt-4ae99e055b8b3f55884206154283adfdae60ba3a.zip
blt-4ae99e055b8b3f55884206154283adfdae60ba3a.tar.gz
blt-4ae99e055b8b3f55884206154283adfdae60ba3a.tar.bz2
add ds9 vo parser
Diffstat (limited to 'ds9/parsers/voparser.tac')
-rw-r--r--ds9/parsers/voparser.tac53
1 files changed, 53 insertions, 0 deletions
diff --git a/ds9/parsers/voparser.tac b/ds9/parsers/voparser.tac
new file mode 100644
index 0000000..85ce25d
--- /dev/null
+++ b/ds9/parsers/voparser.tac
@@ -0,0 +1,53 @@
+%{
+%}
+
+#include yesno.tin
+#include numeric.tin
+#include string.tin
+
+%start command
+
+%token CLOSE_
+%token CONNECT_
+%token DELAY_
+%token DISCONNECT_
+%token INTERNAL_
+%token METHOD_
+%token MIME_
+%token OPEN_
+%token SERVER_
+%token XPA_
+
+%%
+
+#include yesno.trl
+#include numeric.trl
+
+command : vo
+ | vo {yyclearin; YYACCEPT} STRING_
+ ;
+
+vo : OPEN_ {VODialog}
+ | CLOSE_ {VODestroy voi}
+ | METHOD_ method {VOCmdSet method $2}
+ | SERVER_ STRING_ {VOCmdSet server $2}
+ | INTERNAL_ yesno {VOCmdSet hv $2}
+ | DELAY_ INT_ {VOCmdSet delay $2}
+ | CONNECT_ STRING_ {VOCmdConnect $2}
+ | DISCONNECT_ STRING_ {VOCmdDisconnect $2}
+ | STRING_ {VOCmdConnect $1}
+ ;
+
+method : XPA_ {set _ xpa}
+ | MIME_ {set _ mime}
+ ;
+
+%%
+
+proc vo::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}