summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/mosaicirafparser.tac
diff options
context:
space:
mode:
Diffstat (limited to 'ds9/parsers/mosaicirafparser.tac')
-rw-r--r--ds9/parsers/mosaicirafparser.tac34
1 files changed, 34 insertions, 0 deletions
diff --git a/ds9/parsers/mosaicirafparser.tac b/ds9/parsers/mosaicirafparser.tac
new file mode 100644
index 0000000..1ecf784
--- /dev/null
+++ b/ds9/parsers/mosaicirafparser.tac
@@ -0,0 +1,34 @@
+%{
+%}
+
+#include string.tin
+
+%start command
+
+%token MASK_
+%token NEW_
+
+%%
+
+command : mosaiciraf
+ | mosaiciraf {yyclearin; YYACCEPT} STRING_
+ ;
+
+mosaiciraf : opts {MosaicIRAFCmdLoad {} $1}
+ | opts STRING_ {MosaicIRAFCmdLoad $2 $1}
+ ;
+
+opts :
+ | NEW_ {CreateFrame; set _ {}}
+ | MASK_ {set _ mask}
+ ;
+
+%%
+
+proc mosaiciraf::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}