summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-12-10 17:47:44 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-12-10 17:47:44 (GMT)
commitf118aeff4651a6cd93c7ee346c45bcd1ce2a8905 (patch)
treec29e8756346b9017fe7dcf8700ee740cc69eec69 /ds9
parent3aeeb336be684f7a717ceff382e632ae21a84625 (diff)
downloadblt-f118aeff4651a6cd93c7ee346c45bcd1ce2a8905.zip
blt-f118aeff4651a6cd93c7ee346c45bcd1ce2a8905.tar.gz
blt-f118aeff4651a6cd93c7ee346c45bcd1ce2a8905.tar.bz2
add numeric to Contour Levels command
Diffstat (limited to 'ds9')
-rw-r--r--ds9/make.include8
-rw-r--r--ds9/parsers/contourparser.tac9
2 files changed, 11 insertions, 6 deletions
diff --git a/ds9/make.include b/ds9/make.include
index 0d0e028..37a7189 100644
--- a/ds9/make.include
+++ b/ds9/make.include
@@ -7,13 +7,13 @@ vpath %.fcl $(prefix)/ds9/parsers
# -w generate warnings
# -d generate lexer table
$(prefix)/ds9/parsers/%parser.tcl : %parser.tac
- tclsh $(prefix)/taccle/taccle.tcl -p $* -d $<
-# tclsh $(prefix)/taccle/taccle.tcl -p $* -d -w -v $<
+# tclsh $(prefix)/taccle/taccle.tcl -p $* -d $<
+ tclsh $(prefix)/taccle/taccle.tcl -p $* -d -w -v $<
# -d debug
$(prefix)/ds9/parsers/%lex.tcl : %lex.fcl
- tclsh $(prefix)/fickle/fickle.tcl -P $* $<
-# tclsh $(prefix)/fickle/fickle.tcl -P $* -d $<
+# tclsh $(prefix)/fickle/fickle.tcl -P $* $<
+ tclsh $(prefix)/fickle/fickle.tcl -P $* -d $<
#--------------------------library
diff --git a/ds9/parsers/contourparser.tac b/ds9/parsers/contourparser.tac
index 3647f31..417b06b 100644
--- a/ds9/parsers/contourparser.tac
+++ b/ds9/parsers/contourparser.tac
@@ -91,8 +91,13 @@ contour : yesno {ProcessCmdSet contour view $1 UpdateContour}
| GENERATE_ {ContourDialog; ContourGenerateDialog; UpdateContour}
;
-levels : STRING_ {ContourCmdLevels $1}
- | numeric {ContourCmdLevels $1}
+levels : numerics {ContourCmdLevels $1}
+# backward compatible
+ | STRING_ {ContourCmdLevels $1}
+ ;
+
+numerics : numerics numeric {append _ " $2"}
+ | numeric
;
load : STRING_ {ContourCmdLoad $1}