summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/cropparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-03-12 22:04:01 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-03-12 22:04:01 (GMT)
commitb200b4fc6ca872f7de8a5b19adce2f24f3db8ac3 (patch)
tree52bbb4e8958fa19ac957a56ecaad49be303c6964 /ds9/parsers/cropparser.tac
parent902d073ecfb62a1788c919782fe9ad9704b86000 (diff)
downloadblt-b200b4fc6ca872f7de8a5b19adce2f24f3db8ac3.zip
blt-b200b4fc6ca872f7de8a5b19adce2f24f3db8ac3.tar.gz
blt-b200b4fc6ca872f7de8a5b19adce2f24f3db8ac3.tar.bz2
update ds9 parsers
Diffstat (limited to 'ds9/parsers/cropparser.tac')
-rw-r--r--ds9/parsers/cropparser.tac76
1 files changed, 76 insertions, 0 deletions
diff --git a/ds9/parsers/cropparser.tac b/ds9/parsers/cropparser.tac
new file mode 100644
index 0000000..44ff859
--- /dev/null
+++ b/ds9/parsers/cropparser.tac
@@ -0,0 +1,76 @@
+%{
+%}
+
+#include skyformat.tin
+#include skyframe.tin
+#include coords.tin
+#include base.tin
+
+%start command
+
+%token 3D_
+%token CLOSE_
+%token LOCK_
+%token MATCH_
+%token NONE_
+%token OPEN_
+%token RESET_
+
+%%
+
+#include skyformat.trl
+#include skyframe.trl
+#include coords.trl
+#include base.trl
+
+skyformatdef : {set _ degrees}
+ | skyformat {set _ $1}
+ ;
+
+command : crop
+| crop {yyclearin; YYACCEPT} STRING_
+;
+
+crop : OPEN_ {CropDialog}
+ | CLOSE_ {CropDestroyDialog}
+ | MATCH_ coordsys
+ | MATCH_ wcssys
+ | LOCK_ coordsys
+ | LOCK_ wcssys
+ | LOCK_ NONE_
+ | RESET_ {CropReset}
+ | 3D_ 3d
+
+ | numeric numeric numeric numeric {global current; $current(frame) crop center $1 $2 physical fk5 $3 $4 physical degrees}
+ | numeric numeric numeric numeric coordsys {global current; $current(frame) crop center $1 $2 $5 fk5 $3 $4 $5 degrees}
+
+ | numeric numeric numeric numeric wcssys {global current; $current(frame) crop center $1 $2 $5 fk5 $3 $4 $5 degrees}
+ | numeric numeric numeric numeric wcssys skyformat {global current; $current(frame) crop center $1 $2 $5 fk5 $3 $4 $5 $6}
+ | numeric numeric numeric numeric skyframe {global current; $current(frame) crop center $1 $2 wcs $5 $3 $4 wcs degrees}
+ | numeric numeric numeric numeric skyframe skyformat {global current; $current(frame) crop center $1 $2 wcs $5 $3 $4 wcs $6}
+ | numeric numeric numeric numeric wcssys skyframe {global current; $current(frame) crop center $1 $2 $5 $6 $3 $4 $5 degrees}
+ | numeric numeric numeric numeric wcssys skyframe skyformat {global current; $current(frame) crop center $1 $2 $5 $6 $3 $4 $5 $7}
+
+ | SEXSTR_ SEXSTR_ numeric numeric {global current; $current(frame) crop center $1 $2 wcs fk5 $3 $4 wcs degrees}
+ | SEXSTR_ SEXSTR_ numeric numeric wcssys {global current; $current(frame) crop center $1 $2 $5 fk5 $3 $4 $5 degrees}
+ | SEXSTR_ SEXSTR_ numeric numeric wcssys skyformat {global current; $current(frame) crop center $1 $2 $5 fk5 $3 $4 $5 $6}
+ | SEXSTR_ SEXSTR_ numeric numeric skyframe {global current; $current(frame) crop center $1 $2 wcs $5 $3 $4 wcs degrees}
+ | SEXSTR_ SEXSTR_ numeric numeric skyframe skyformat {global current; $current(frame) crop center $1 $2 wcs $5 $3 $4 wcs $6}
+ | SEXSTR_ SEXSTR_ numeric numeric wcssys skyframe {global current; $current(frame) crop center $1 $2 $5 $6 $3 $4 $5 degrees}
+ | SEXSTR_ SEXSTR_ numeric numeric wcssys skyframe skyformat {global current; $current(frame) crop center $1 $2 $5 $6 $3 $4 $5 $7}
+ ;
+
+3d : numeric numeric {global current; $current(frame) crop 3d $1 $2 image}
+ | numeric numeric coordsys {global current; $current(frame) crop 3d $1 $2 $3}
+ | numeric numeric wcssys {global current; $current(frame) crop 3d $1 $2 $3}
+ ;
+
+%%
+
+proc crop::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}