summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/mecubeparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-05-09 19:50:03 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-05-09 19:50:03 (GMT)
commit64ff2c1f3dbbf15e0c89feeced72ba783a780df4 (patch)
treeb16cee7d4543df15585a021ffba998524664c9b6 /ds9/parsers/mecubeparser.tac
parent5273df633cc312db28f2778b05dac48cbe3ae455 (diff)
downloadblt-64ff2c1f3dbbf15e0c89feeced72ba783a780df4.zip
blt-64ff2c1f3dbbf15e0c89feeced72ba783a780df4.tar.gz
blt-64ff2c1f3dbbf15e0c89feeced72ba783a780df4.tar.bz2
add ds9 mecube parser
Diffstat (limited to 'ds9/parsers/mecubeparser.tac')
-rw-r--r--ds9/parsers/mecubeparser.tac36
1 files changed, 36 insertions, 0 deletions
diff --git a/ds9/parsers/mecubeparser.tac b/ds9/parsers/mecubeparser.tac
new file mode 100644
index 0000000..cb4b8ff
--- /dev/null
+++ b/ds9/parsers/mecubeparser.tac
@@ -0,0 +1,36 @@
+%{
+%}
+
+#include string.tin
+
+%start command
+
+%token MASK_
+%token NEW_
+%token SLICE_
+
+%%
+
+command : mecube
+ | mecube {yyclearin; YYACCEPT} STRING_
+ ;
+
+mecube : opts {MECubeCmdLoad {}}
+ | opts STRING_ {MECubeCmdLoad $2}
+ ;
+
+opts :
+ | NEW_ {CreateFrame}
+ | MASK_
+ | SLICE_
+ ;
+
+%%
+
+proc mecube::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}