summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/contoursendparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-01 19:44:20 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-01 19:44:20 (GMT)
commitc4d56a837ea043404ca8cff41330770bc0614b1f (patch)
treea1cba8215fc8ffebcd8e86a241dcb77640f95e7d /ds9/parsers/contoursendparser.tac
parent15bd8441b3977ccd664fdbc4a8d07e8931be480a (diff)
downloadblt-c4d56a837ea043404ca8cff41330770bc0614b1f.zip
blt-c4d56a837ea043404ca8cff41330770bc0614b1f.tar.gz
blt-c4d56a837ea043404ca8cff41330770bc0614b1f.tar.bz2
add ds9 contour send parser
Diffstat (limited to 'ds9/parsers/contoursendparser.tac')
-rw-r--r--ds9/parsers/contoursendparser.tac57
1 files changed, 57 insertions, 0 deletions
diff --git a/ds9/parsers/contoursendparser.tac b/ds9/parsers/contoursendparser.tac
new file mode 100644
index 0000000..050ec09
--- /dev/null
+++ b/ds9/parsers/contoursendparser.tac
@@ -0,0 +1,57 @@
+%{
+%}
+
+#include coords.tin
+#include string.tin
+
+%start contoursend
+
+%token COLOR_
+%token DASH_
+%token EXP_
+%token LEVELS_
+%token LIMITS_
+%token LOG_
+%token METHOD_
+%token MODE_
+%token NLEVELS_
+%token SCALE_
+%token SCOPE_
+%token SMOOTH_
+%token WIDTH_
+
+%%
+
+#include coords.trl
+
+contoursend : {ProcessSendCmdYesNo contour view}
+ | COLOR_ {ProcessSendCmdGet contour color}
+ | WIDTH_ {ProcessSendCmdGet contour width}
+ | DASH_ {ProcessSendCmdYesNo contour dash}
+ | SMOOTH_ {ProcessSendCmdGet contour smooth}
+ | METHOD_ {ProcessSendCmdGet contour method}
+ | NLEVELS_ {ProcessSendCmdGet contour numlevel}
+ | SCALE_ {ProcessSendCmdGet contour scale}
+ | LOG_ EXP_ {ProcessSendCmdGet contour log}
+# backward compatibility
+ | LOG_ {ProcessSendCmdGet contour log}
+ | MODE_ {ProcessSendCmdGet contour mode}
+ | SCOPE_ {ProcessSendCmdGet contour scope}
+ | LIMITS_ {ContourSendCmdLimits}
+ | LEVELS_ {ContourSendCmdLevels}
+
+ | coordsys {ProcessSendCmdSend {.ctr} "get contour $1 fk5"}
+ | wcssys {ProcessSendCmdSend {.ctr} "get contour $1 fk5"}
+ | skyframe {ProcessSendCmdSend {.ctr} "get contour wcs $1"}
+ | wcssys skyframe {ProcessSendCmdSend {.ctr} "get contour $1 $2"}
+ ;
+
+%%
+
+proc contoursend::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}