summaryrefslogtreecommitdiffstats
path: root/ds9/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'ds9/parsers')
-rw-r--r--ds9/parsers/contourparser.tac11
-rw-r--r--ds9/parsers/masklex.fcl8
-rw-r--r--ds9/parsers/maskparser.tac29
-rw-r--r--ds9/parsers/masksendlex.fcl2
-rw-r--r--ds9/parsers/masksendparser.tac4
-rw-r--r--ds9/parsers/mosaicimagewfpc2lex.fcl1
-rw-r--r--ds9/parsers/mosaicimagewfpc2parser.tac8
7 files changed, 57 insertions, 6 deletions
diff --git a/ds9/parsers/contourparser.tac b/ds9/parsers/contourparser.tac
index 11384f2..417b06b 100644
--- a/ds9/parsers/contourparser.tac
+++ b/ds9/parsers/contourparser.tac
@@ -87,10 +87,19 @@ contour : yesno {ProcessCmdSet contour view $1 UpdateContour}
| MODE_ modes
| SCOPE_ scope {ContourCmdMode scope $2}
| LIMITS_ numeric numeric {ContourCmdLimits $2 $3}
- | LEVELS_ STRING_ {ContourCmdLevels $2}
+ | LEVELS_ levels
| GENERATE_ {ContourDialog; ContourGenerateDialog; UpdateContour}
;
+levels : numerics {ContourCmdLevels $1}
+# backward compatible
+ | STRING_ {ContourCmdLevels $1}
+ ;
+
+numerics : numerics numeric {append _ " $2"}
+ | numeric
+ ;
+
load : STRING_ {ContourCmdLoad $1}
| LEVELS_ STRING_ {ContourCmdLoadLevels $2}
# backward compatibility
diff --git a/ds9/parsers/masklex.fcl b/ds9/parsers/masklex.fcl
index 080b345..22817ef 100644
--- a/ds9/parsers/masklex.fcl
+++ b/ds9/parsers/masklex.fcl
@@ -11,9 +11,17 @@ close {return $CLOSE_}
clear {return $CLEAR_}
color {return $COLOR_}
mark {return $MARK_}
+nan {return $NAN_}
+nonnan {return $NONNAN_}
+nonzero {return $NONZERO_}
open {return $OPEN_}
+range {return $RANGE_}
+system {return $SYSTEM_}
transparency {return $TRANSPARENCY_}
+zero {return $ZERO_}
+#include coordsys.fin
+#include wcssys.fin
#include numeric.fin
#include string.fin
#include ws.fin
diff --git a/ds9/parsers/maskparser.tac b/ds9/parsers/maskparser.tac
index 4759e50..3c777a7 100644
--- a/ds9/parsers/maskparser.tac
+++ b/ds9/parsers/maskparser.tac
@@ -2,6 +2,8 @@
%}
#include def.tin
+#include coordsys.tin
+#include wcssys.tin
#include numeric.tin
#include string.tin
@@ -11,11 +13,19 @@
%token CLOSE_
%token COLOR_
%token MARK_
+%token NAN_
+%token NONNAN_
+%token NONZERO_
%token OPEN_
+%token RANGE_
+%token SYSTEM_
%token TRANSPARENCY_
+%token ZERO_
%%
+#include coordsys.trl
+#include wcssys.trl
#include numeric.trl
command : mask
@@ -23,12 +33,27 @@ command : mask
;
mask : {global parse; set parse(result) mask}
- | OPEN_ {MaskDialog}
+ | OPEN_
| CLOSE_ {MaskDestroyDialog}
| CLEAR_ {MaskClear}
| COLOR_ STRING_ {ProcessCmdSet mask color $2 MaskColor}
- | MARK_ INT_ {ProcessCmdSet mask mark $2 MaskMark}
+ | MARK_ mark {ProcessCmdSet mask mark $2 MaskMark}
+ | RANGE_ numeric numeric {ProcessCmdSet2 mask low $2 high $3 MaskRange}
+ | SYSTEM_ system
| TRANSPARENCY_ numeric {ProcessCmdSet mask transparency $2 MaskTransparency}
+# backward compatibility
+ | MARK_ INT_ {ProcessCmdSet mask mark $2 MaskMark}
+ ;
+
+mark : ZERO_ {set _ zero}
+ | NONZERO_ {set _ nonzero}
+ | NAN_ {set _ nan}
+ | NONNAN_ {set _ nonnan}
+ | RANGE_ {set _ range}
+ ;
+
+system : coordsys {ProcessCmdSet mask system $1 MaskSystem}
+ | wcssys {ProcessCmdSet mask system $1 MaskSystem}
;
%%
diff --git a/ds9/parsers/masksendlex.fcl b/ds9/parsers/masksendlex.fcl
index 993e163..71d11c8 100644
--- a/ds9/parsers/masksendlex.fcl
+++ b/ds9/parsers/masksendlex.fcl
@@ -9,6 +9,8 @@
color {return $COLOR_}
mark {return $MARK_}
+range {return $RANGE_}
+system {return $SYSTEM_}
transparency {return $TRANSPARENCY_}
#include ws.fin
diff --git a/ds9/parsers/masksendparser.tac b/ds9/parsers/masksendparser.tac
index bfb4f8a..94d9acd 100644
--- a/ds9/parsers/masksendparser.tac
+++ b/ds9/parsers/masksendparser.tac
@@ -6,12 +6,16 @@
%token COLOR_
%token MARK_
+%token RANGE_
+%token SYSTEM_
%token TRANSPARENCY_
%%
masksend : COLOR_ {ProcessSendCmdGet mask color}
| MARK_ {ProcessSendCmdGet mask mark}
+ | RANGE_ {ProcessSendCmdGet2 mask low high}
+ | SYSTEM_ {ProcessSendCmdGet mask system}
| TRANSPARENCY_ {ProcessSendCmdGet mask transparency}
;
diff --git a/ds9/parsers/mosaicimagewfpc2lex.fcl b/ds9/parsers/mosaicimagewfpc2lex.fcl
index bdcec4d..5e875f7 100644
--- a/ds9/parsers/mosaicimagewfpc2lex.fcl
+++ b/ds9/parsers/mosaicimagewfpc2lex.fcl
@@ -7,6 +7,7 @@
%%
+mask {return $MASK_}
new {return $NEW_}
#include string.fin
diff --git a/ds9/parsers/mosaicimagewfpc2parser.tac b/ds9/parsers/mosaicimagewfpc2parser.tac
index 88030fd..a607419 100644
--- a/ds9/parsers/mosaicimagewfpc2parser.tac
+++ b/ds9/parsers/mosaicimagewfpc2parser.tac
@@ -6,6 +6,7 @@
%start command
+%token MASK_
%token NEW_
%%
@@ -14,12 +15,13 @@
command : mosaicimagewfpc2
;
-mosaicimagewfpc2 : opts {MosaicImageWFPC2CmdLoad {}}
- | opts STRING_ {MosaicImageWFPC2CmdLoad $2}
+mosaicimagewfpc2 : opts {MosaicImageWFPC2CmdLoad {} $1}
+ | opts STRING_ {MosaicImageWFPC2CmdLoad $2 $1}
;
opts :
- | NEW_ {CreateFrame}
+ | NEW_ {CreateFrame; set _ {}}
+ | MASK_ {set _ mask}
;
%%