summaryrefslogtreecommitdiffstats
path: root/ds9/parsers
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-26 20:52:42 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-26 20:52:42 (GMT)
commita5079a3966b735b970dd9b749ede013c1412ac48 (patch)
tree64a042c76c8e034e788d3eef4be451681e992ab3 /ds9/parsers
parent6be6a6ed8d22451a74c3af69bc9898ce5b3199f8 (diff)
downloadblt-a5079a3966b735b970dd9b749ede013c1412ac48.zip
blt-a5079a3966b735b970dd9b749ede013c1412ac48.tar.gz
blt-a5079a3966b735b970dd9b749ede013c1412ac48.tar.bz2
update mask,cmap parsers
Diffstat (limited to 'ds9/parsers')
-rw-r--r--ds9/parsers/cmapparser.tac7
-rw-r--r--ds9/parsers/masklex.fcl2
-rw-r--r--ds9/parsers/maskparser.tac6
3 files changed, 11 insertions, 4 deletions
diff --git a/ds9/parsers/cmapparser.tac b/ds9/parsers/cmapparser.tac
index 5726e03..b3a78fb 100644
--- a/ds9/parsers/cmapparser.tac
+++ b/ds9/parsers/cmapparser.tac
@@ -29,7 +29,7 @@ command : cmap
| cmap {yyclearin; YYACCEPT} STRING_
;
-cmap : STRING_ {CmapCmd $1}
+cmap : cmapSelect
| OPEN_ {ColormapDialog}
| CLOSE_ {ColormapDestroyDialog}
@@ -51,6 +51,11 @@ cmap : STRING_ {CmapCmd $1}
| VALUE_ numeric numeric {CmapValueCmd $2 $3}
;
+cmapSelect : STRING_ {CmapCmd $1}
+ | 'a' {CmapCmd a}
+ | 'b' {CmapCmd b}
+ ;
+
cmapLoad : STRING_ {LoadColormapFile $1; FileLast colormapfbox $1}
;
diff --git a/ds9/parsers/masklex.fcl b/ds9/parsers/masklex.fcl
index 1ae1583..080b345 100644
--- a/ds9/parsers/masklex.fcl
+++ b/ds9/parsers/masklex.fcl
@@ -14,7 +14,7 @@ mark {return $MARK_}
open {return $OPEN_}
transparency {return $TRANSPARENCY_}
-#include int.fin
+#include numeric.fin
#include string.fin
#include ws.fin
diff --git a/ds9/parsers/maskparser.tac b/ds9/parsers/maskparser.tac
index f7a3376..c42ce3c 100644
--- a/ds9/parsers/maskparser.tac
+++ b/ds9/parsers/maskparser.tac
@@ -2,7 +2,7 @@
%}
#include def.tin
-#include int.tin
+#include numeric.tin
#include string.tin
%start command
@@ -16,6 +16,8 @@
%%
+#include numeric.trl
+
command : mask
| mask {yyclearin; YYACCEPT} STRING_
;
@@ -26,7 +28,7 @@ mask : {global parse; set parse(result) mask}
| CLEAR_ {MaskClear}
| COLOR_ STRING_ {ProcessCmdSet mask color $2 MaskColor}
| MARK_ INT_ {ProcessCmdSet mask mark $2 MaskMark}
- | TRANSPARENCY_ INT_ {ProcessCmdSet mask transparency $2 MaskTransparency}
+ | TRANSPARENCY_ numeric {ProcessCmdSet mask transparency $2 MaskTransparency}
;
%%