summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/catsendparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-04 18:56:09 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-04 18:56:09 (GMT)
commitb2e4e09a867e5818a145eaf346e69cd88efeadc5 (patch)
tree306de34d0d914e9970f24aa6b3bbec57f4507355 /ds9/parsers/catsendparser.tac
parentc4d56a837ea043404ca8cff41330770bc0614b1f (diff)
downloadblt-b2e4e09a867e5818a145eaf346e69cd88efeadc5.zip
blt-b2e4e09a867e5818a145eaf346e69cd88efeadc5.tar.gz
blt-b2e4e09a867e5818a145eaf346e69cd88efeadc5.tar.bz2
add ds9 catalog send parser
Diffstat (limited to 'ds9/parsers/catsendparser.tac')
-rw-r--r--ds9/parsers/catsendparser.tac28
1 files changed, 28 insertions, 0 deletions
diff --git a/ds9/parsers/catsendparser.tac b/ds9/parsers/catsendparser.tac
new file mode 100644
index 0000000..6c36111
--- /dev/null
+++ b/ds9/parsers/catsendparser.tac
@@ -0,0 +1,28 @@
+%{
+%}
+
+#include string.tin
+
+%token HEADER_
+
+%start catsend
+
+%%
+
+catsend : {if {![CatalogCmdCheck]} {cat::YYABORT}} catsendCmd
+ | STRING_ {if {![CatalogSendCmdRef cat${1}]} {plot::YYABORT}} catsendCmd
+ ;
+
+catsendCmd : {ProcessSendCmdGet icat cats}
+ | HEADER_ {global cvarname; ProcessSendCmdResult {.txt} [CATGetHeader $cvarname]}
+ ;
+
+%%
+
+proc catsend::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}