summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/urlfitsparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-05-17 18:28:03 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-05-17 18:28:03 (GMT)
commite8ee5fa11878a7be31e5327b4d7abbecdfbad35f (patch)
tree2930e3962b4a032e25bbebd970686c5d09e53fb5 /ds9/parsers/urlfitsparser.tac
parent6cb5c6f14c66b5f21214cfc4aa3e08e1f113c856 (diff)
downloadblt-e8ee5fa11878a7be31e5327b4d7abbecdfbad35f.zip
blt-e8ee5fa11878a7be31e5327b4d7abbecdfbad35f.tar.gz
blt-e8ee5fa11878a7be31e5327b4d7abbecdfbad35f.tar.bz2
add ds9 urlfits parser
Diffstat (limited to 'ds9/parsers/urlfitsparser.tac')
-rw-r--r--ds9/parsers/urlfitsparser.tac36
1 files changed, 36 insertions, 0 deletions
diff --git a/ds9/parsers/urlfitsparser.tac b/ds9/parsers/urlfitsparser.tac
new file mode 100644
index 0000000..bd1ac6c
--- /dev/null
+++ b/ds9/parsers/urlfitsparser.tac
@@ -0,0 +1,36 @@
+%{
+%}
+
+#include string.tin
+
+%start command
+
+%token MASK_
+%token NEW_
+%token SLICE_
+
+%%
+
+# XPA/SAMP only
+command : urlfits
+ ;
+
+urlfits: new STRING_ {LoadURLFits $2 {} {}}
+ | new MASK_ STRING_ {LoadURLFits $3 mask {}}
+ | new SLICE_ STRING_ {LoadURLFits $3 {} slice}
+ | new MASK_ SLICE_ STRING_ {LoadURLFits $4 mask slice}
+;
+
+new :
+ | NEW_ {CreateFrame}
+ ;
+
+%%
+
+proc urlfits::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}