summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/iisparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-05-08 19:41:03 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-05-08 19:41:03 (GMT)
commit7cfa08b0968e0af4bc64ea0eab90d2b3f315fcbc (patch)
tree862adadde8bc462291baf42d9f48f51f454e19d6 /ds9/parsers/iisparser.tac
parent7f2438deb2325b457f5d770667654190c8376dbc (diff)
downloadblt-7cfa08b0968e0af4bc64ea0eab90d2b3f315fcbc.zip
blt-7cfa08b0968e0af4bc64ea0eab90d2b3f315fcbc.tar.gz
blt-7cfa08b0968e0af4bc64ea0eab90d2b3f315fcbc.tar.bz2
add ds9 mask parser
Diffstat (limited to 'ds9/parsers/iisparser.tac')
-rw-r--r--ds9/parsers/iisparser.tac31
1 files changed, 31 insertions, 0 deletions
diff --git a/ds9/parsers/iisparser.tac b/ds9/parsers/iisparser.tac
new file mode 100644
index 0000000..e486cbb
--- /dev/null
+++ b/ds9/parsers/iisparser.tac
@@ -0,0 +1,31 @@
+%{
+%}
+
+#include numeric.tin
+#include string.tin
+
+%start command
+
+%token FILENAME_
+
+%%
+
+#include numeric.trl
+
+command : iis
+ | iis {yyclearin; YYACCEPT} STRING_
+ ;
+
+iis : FILENAME_ STRING_ {IISCmd $2}
+ | FILENAME_ STRING_ INT_ {IISCmd $2 $3}
+ ;
+
+%%
+
+proc iis::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}